[jboss-cvs] JBossAS SVN: r100705 - projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 8 11:37:23 EST 2010


Author: anil.saldhana at jboss.com
Date: 2010-02-08 11:37:23 -0500 (Mon, 08 Feb 2010)
New Revision: 100705

Modified:
   projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java
Log:
SECURITY-452: merge in Richard Opalka's patch for removing direct apache xalan dependency

Modified: projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java
===================================================================
--- projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java	2010-02-08 16:34:29 UTC (rev 100704)
+++ projects/security/security-xacml/trunk/jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java	2010-02-08 16:37:23 UTC (rev 100705)
@@ -42,10 +42,12 @@
 
 
 import java.net.URI;
-
 import java.util.ArrayList;
 
-import org.apache.xpath.XPathAPI;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+
 import org.jboss.security.xacml.sunxacml.EvaluationCtx;
 import org.jboss.security.xacml.sunxacml.ParsingException;
 import org.jboss.security.xacml.sunxacml.PolicyMetaData;
@@ -56,7 +58,6 @@
 import org.jboss.security.xacml.sunxacml.cond.EvaluationResult;
 import org.jboss.security.xacml.sunxacml.ctx.Status;
 import org.jboss.security.xacml.sunxacml.finder.AttributeFinderModule;
-
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -191,7 +192,9 @@
         NodeList matches = null;
         try {
             // NOTE: see comments in XALAN docs about why this is slow
-            matches = XPathAPI.selectNodeList(root, rootPath + path, nsNode);
+            XPath xpath = XPathFactory.newInstance().newXPath();
+            matches = (NodeList)xpath.evaluate(rootPath + path, root, XPathConstants.NODESET);
+
         } catch (Exception e) {
             // in the case of any exception, we need to return an error
             return createProcessingError("error in XPath: " + e.getMessage());




More information about the jboss-cvs-commits mailing list