8087283: Add support for the XML Signature here() function to the JDK XPath implementation
authormullan
Fri, 12 Jun 2015 16:36:33 -0400
changeset 31142 8e60d9bab54b
parent 31085 9bde92d55eae
child 31143 35889b7bb6e9
8087283: Add support for the XML Signature here() function to the JDK XPath implementation Reviewed-by: alanb, joehw
jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XalanXPathAPI.java
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XalanXPathAPI.java	Thu Jun 11 10:38:29 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/XalanXPathAPI.java	Fri Jun 12 16:36:33 2015 -0400
@@ -167,6 +167,13 @@
 
     private synchronized static void fixupFunctionTable() {
         installed = false;
+        if (new FunctionTable().functionAvailable("here")) {
+            if (log.isLoggable(java.util.logging.Level.FINE)) {
+                log.log(java.util.logging.Level.FINE, "Here function already registered");
+            }
+            installed = true;
+            return;
+        }
         if (log.isLoggable(java.util.logging.Level.FINE)) {
             log.log(java.util.logging.Level.FINE, "Registering Here function");
         }