[seam-commits] Seam SVN: r9047 - branches/community/Seam_2_0/src/main/org/jboss/seam/international.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sat Sep 20 17:35:21 EDT 2008
Author: dan.j.allen
Date: 2008-09-20 17:35:21 -0400 (Sat, 20 Sep 2008)
New Revision: 9047
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/international/LocaleConfig.java
Log:
don't allow absense of JSF Application cause things to fail
Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/international/LocaleConfig.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/international/LocaleConfig.java 2008-09-20 21:33:28 UTC (rev 9046)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/international/LocaleConfig.java 2008-09-20 21:35:21 UTC (rev 9047)
@@ -130,8 +130,16 @@
private Application getApplication()
{
- ApplicationFactory factory = (ApplicationFactory) FactoryFinder
- .getFactory(FactoryFinder.APPLICATION_FACTORY);
- return factory.getApplication();
+ try
+ {
+ ApplicationFactory factory = (ApplicationFactory) FactoryFinder
+ .getFactory(FactoryFinder.APPLICATION_FACTORY);
+ return factory.getApplication();
+ }
+ catch (IllegalStateException e)
+ {
+ // just in case, for units and the like
+ return null;
+ }
}
}
\ No newline at end of file
More information about the seam-commits
mailing list