You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2006/06/06 15:24:01 UTC

svn commit: r412116 - /xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java

Author: mullan
Date: Tue Jun  6 06:24:01 2006
New Revision: 412116

URL: http://svn.apache.org/viewvc?rev=412116&view=rev
Log:
Add comment about why there is a reference equality check on xpath strings. 
Findbugs warns about this.

Modified:
    xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java

Modified: xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java?rev=412116&r1=412115&r2=412116&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/CachedXPathFuncHereAPI.java Tue Jun  6 06:24:01 2006
@@ -287,6 +287,7 @@
                                       .getDocumentElement()
                                    : namespaceNode);
 
+      // only check if string points to different object (for performance)
       if (str!=xpathStr) {
         if (str.indexOf("here()")>0) {
             _context.reset();
@@ -336,6 +337,7 @@
       //    XPathContext should be done away with.)
       // Create the XPath object.
       //String str = CachedXPathFuncHereAPI.getStrFromNode(xpathnode);
+    // only check if string points to different object (for performance)
     if (str!=xpathStr) {
         if (str.indexOf("here()")>0) {
             _context.reset();