Author: pete.muir(a)jboss.org
Date: 2010-02-16 14:12:06 -0500 (Tue, 16 Feb 2010)
New Revision: 5850
Modified:
core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfApiAbstraction.java
Log:
commit something like Dan's changes
Modified: core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfApiAbstraction.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfApiAbstraction.java 2010-02-16
19:11:20 UTC (rev 5849)
+++ core/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfApiAbstraction.java 2010-02-16
19:12:06 UTC (rev 5850)
@@ -19,7 +19,6 @@
import org.jboss.weld.bootstrap.api.Service;
import org.jboss.weld.resources.spi.ResourceLoader;
import org.jboss.weld.util.ApiAbstraction;
-import org.jboss.weld.util.reflection.SecureReflections;
/**
* Utility class for JSF related components, concepts etc. It can also
@@ -46,12 +45,14 @@
this.UICOMPONENT_CLASS =
classForName("javax.faces.component.UIComponent");
this.FACES_CONTEXT = classForName("javax.faces.context.FacesContext");
this.BEHAVIOR_CLASS =
classForName("javax.faces.component.behavior.Behavior");
- double version = 2.0;
- if (this.FACES_CONTEXT != null)
+ if
(this.BEHAVIOR_CLASS.getName().equals("javax.faces.component.behavior.Behavior"))
{
- version = SecureReflections.isMethodExists(FACES_CONTEXT,
"isPostback") ? 2.0 : 1.2;
+ MINIMUM_API_VERSION = 2.0;
}
- MINIMUM_API_VERSION = version;
+ else
+ {
+ MINIMUM_API_VERSION = 1.2;
+ }
}
public boolean isApiVersionCompatibleWith(double version)
Show replies by date