[webbeans-commits] Webbeans SVN: r3624 - ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Aug 31 16:58:09 EDT 2009
Author: pete.muir at jboss.org
Date: 2009-08-31 16:58:09 -0400 (Mon, 31 Aug 2009)
New Revision: 3624
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java
Log:
Guard against JSF not being present
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java 2009-08-31 06:09:23 UTC (rev 3623)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/jsf/JsfApiAbstraction.java 2009-08-31 20:58:09 UTC (rev 3624)
@@ -43,14 +43,17 @@
this.UICOMPONENT_CLASS = classForName("javax.faces.component.UIComponent");
this.FACES_CONTEXT = classForName("javax.faces.context.FacesContext");
double version = 2.0;
- try
+ if (this.FACES_CONTEXT != null)
{
- this.FACES_CONTEXT.getMethod("isPostback", new Class[] {});
+ try
+ {
+ this.FACES_CONTEXT.getMethod("isPostback", new Class[] {});
+ }
+ catch (NoSuchMethodException e)
+ {
+ version = 1.2;
+ }
}
- catch (NoSuchMethodException e)
- {
- version = 1.2;
- }
MINIMUM_API_VERSION = version;
}
More information about the weld-commits
mailing list