[jboss-cvs] JBossAS SVN: r111112 - projects/specs/trunk/jboss-jstl-api_1.2_spec/src/main/java/org/apache/taglibs/standard/tag/common/xml.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 7 00:15:26 EDT 2011


Author: jason.greene at jboss.com
Date: 2011-04-07 00:15:22 -0400 (Thu, 07 Apr 2011)
New Revision: 111112

Modified:
   projects/specs/trunk/jboss-jstl-api_1.2_spec/src/main/java/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java
Log:
Always use defining CL


Modified: projects/specs/trunk/jboss-jstl-api_1.2_spec/src/main/java/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java
===================================================================
--- projects/specs/trunk/jboss-jstl-api_1.2_spec/src/main/java/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java	2011-04-06 20:40:01 UTC (rev 111111)
+++ projects/specs/trunk/jboss-jstl-api_1.2_spec/src/main/java/org/apache/taglibs/standard/tag/common/xml/XPathUtil.java	2011-04-07 04:15:22 UTC (rev 111112)
@@ -135,31 +135,12 @@
     private static HashMap exprCache;
     private static JSTLXPathNamespaceContext jstlXPathNamespaceContext = null;
 
-    private static final String XPATH_FACTORY_CLASS_NAME = 
-            "org.apache.taglibs.standard.tag.common.xml.JSTLXPathFactory";
+    private static final String XPATH_FACTORY_CLASS_NAME = JSTLXPathFactory.class.getName();
+
     private static XPathFactory XPATH_FACTORY;
     static {
-        // If the system property DEFAULT_PROPERTY_NAME + ":uri" is present, 
-        // where uri is the parameter to this method, then its value is read 
-        // as a class name. The method will try to create a new instance of 
-        // this class by using the class loader, and returns it if it is 
-        // successfully created.
-        if (System.getSecurityManager() !=  null) {
-             AccessController.doPrivileged(new PrivilegedAction(){
-                public Object run(){
-                    System.setProperty(XPathFactory.DEFAULT_PROPERTY_NAME + 
-                            ":" + XPathFactory.DEFAULT_OBJECT_MODEL_URI, 
-                            XPATH_FACTORY_CLASS_NAME);
-                    return null;
-                }
-            });
-        } else {
-            System.setProperty(XPathFactory.DEFAULT_PROPERTY_NAME + 
-                ":" + XPathFactory.DEFAULT_OBJECT_MODEL_URI, 
-                XPATH_FACTORY_CLASS_NAME);
-        }
         try {
-            XPATH_FACTORY = XPathFactory.newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI);
+            XPATH_FACTORY = XPathFactory.newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI, XPATH_FACTORY_CLASS_NAME, JSTLXPathFactory.class.getClassLoader());
         } catch (XPathFactoryConfigurationException xpce) {
             xpce.printStackTrace();
         }



More information about the jboss-cvs-commits mailing list