You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2013/08/12 12:28:34 UTC

svn commit: r1513098 - in /santuario/xml-security-java/trunk: ./ src/main/java/org/apache/xml/security/stax/config/ src/main/java/org/apache/xml/security/stax/ext/ src/main/java/org/apache/xml/security/stax/ext/stax/ src/main/java/org/apache/xml/securi...

Author: coheigea
Date: Mon Aug 12 10:28:33 2013
New Revision: 1513098

URL: http://svn.apache.org/r1513098
Log:
Finished with PMD upgrade

Modified:
    santuario/xml-security-java/trunk/pom.xml
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityUtils.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecAttribute.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/DSAUtils.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/ECDSAUtils.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverFilesystem.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverHttp.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/Canonicalizer20010315_Excl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/TrimmerOutputStream.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java

Modified: santuario/xml-security-java/trunk/pom.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/pom.xml?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/pom.xml (original)
+++ santuario/xml-security-java/trunk/pom.xml Mon Aug 12 10:28:33 2013
@@ -113,8 +113,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-pmd-plugin</artifactId>
-                <!--<version>3.0.1</version>-->
-                <version>2.5</version>
+                <version>3.0.1</version>
                 <configuration>
                     <linkXRef>false</linkXRef>
                     <sourceEncoding>utf-8</sourceEncoding>

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java Mon Aug 12 10:28:33 2013
@@ -49,7 +49,7 @@ public class Init {
 
     @SuppressWarnings("unchecked")
     public static synchronized void init(URI uri) throws XMLSecurityException {
-        if (initialized == null || (uri != null && !uri.equals(initialized))) {
+        if (initialized == null || uri != null && !uri.equals(initialized)) {
             try {
                 JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
                 final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityUtils.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityUtils.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityUtils.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/XMLSecurityUtils.java Mon Aug 12 10:28:33 2013
@@ -394,7 +394,7 @@ public class XMLSecurityUtils {
         if (size > 0) {
             keySpec = 
                 new SecretKeySpec(
-                    rawKey, 0, ((rawKey.length > size) ? size : rawKey.length), keyAlgorithm
+                    rawKey, 0, rawKey.length > size ? size : rawKey.length, keyAlgorithm
                 );
         } else {
             keySpec = new SecretKeySpec(rawKey, keyAlgorithm);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecAttribute.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecAttribute.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecAttribute.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecAttribute.java Mon Aug 12 10:28:33 2013
@@ -26,5 +26,5 @@ import javax.xml.stream.events.Attribute
  */
 public interface XMLSecAttribute extends XMLSecEvent, Attribute, Comparable<XMLSecAttribute> {
 
-    public XMLSecNamespace getAttributeNamespace();
+    XMLSecNamespace getAttributeNamespace();
 }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java Mon Aug 12 10:28:33 2013
@@ -18,17 +18,27 @@
  */
 package org.apache.xml.security.stax.impl;
 
+import java.util.Iterator;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.events.Attribute;
+import javax.xml.stream.events.Comment;
+import javax.xml.stream.events.DTD;
+import javax.xml.stream.events.EntityReference;
+import javax.xml.stream.events.Namespace;
+import javax.xml.stream.events.ProcessingInstruction;
+
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.ext.InputProcessorChain;
 import org.apache.xml.security.stax.ext.XMLSecurityProperties;
 import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
 
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.*;
-import javax.xml.stream.events.*;
-import java.util.Iterator;
-
 /**
  * A custom implementation of a XMLStreamReader to get back from the XMLEventReader world
  * to XMLStreamReader
@@ -400,7 +410,7 @@ public class XMLSecurityStreamReader imp
             case ENTITY_REFERENCE:
                 return ((EntityReference) xmlSecEvent).getDeclaration().getReplacementText();
             case DTD:
-                return ((javax.xml.stream.events.DTD) xmlSecEvent).getDocumentTypeDeclaration();
+                return ((DTD) xmlSecEvent).getDocumentTypeDeclaration();
             case COMMENT:
                 return ((Comment) xmlSecEvent).getText();
             case CDATA:
@@ -419,7 +429,7 @@ public class XMLSecurityStreamReader imp
             case ENTITY_REFERENCE:
                 return ((EntityReference) xmlSecEvent).getDeclaration().getReplacementText().toCharArray();
             case DTD:
-                return ((javax.xml.stream.events.DTD) xmlSecEvent).getDocumentTypeDeclaration().toCharArray();
+                return ((DTD) xmlSecEvent).getDocumentTypeDeclaration().toCharArray();
             case COMMENT:
                 return ((Comment) xmlSecEvent).getText().toCharArray();
             case CDATA:
@@ -439,7 +449,7 @@ public class XMLSecurityStreamReader imp
                 ((EntityReference) xmlSecEvent).getDeclaration().getReplacementText().getChars(sourceStart, sourceStart + length, target, targetStart);
                 return sourceStart + length;
             case DTD:
-                ((javax.xml.stream.events.DTD) xmlSecEvent).getDocumentTypeDeclaration().getChars(sourceStart, sourceStart + length, target, targetStart);
+                ((DTD) xmlSecEvent).getDocumentTypeDeclaration().getChars(sourceStart, sourceStart + length, target, targetStart);
                 return sourceStart + length;
             case COMMENT:
                 ((Comment) xmlSecEvent).getText().getChars(sourceStart, sourceStart + length, target, targetStart);
@@ -466,7 +476,7 @@ public class XMLSecurityStreamReader imp
             case ENTITY_REFERENCE:
                 return ((EntityReference) xmlSecEvent).getDeclaration().getReplacementText().length();
             case DTD:
-                return ((javax.xml.stream.events.DTD) xmlSecEvent).getDocumentTypeDeclaration().length();
+                return ((DTD) xmlSecEvent).getDocumentTypeDeclaration().length();
             case COMMENT:
                 return ((Comment) xmlSecEvent).getText().length();
             case CDATA:
@@ -490,7 +500,7 @@ public class XMLSecurityStreamReader imp
     @Override
     public boolean hasText() {
         XMLSecEvent xmlSecEvent = getCurrentEvent();
-        return (((1 << xmlSecEvent.getEventType()) & MASK_GET_TEXT) != 0);
+        return ((1 << xmlSecEvent.getEventType()) & MASK_GET_TEXT) != 0;
     }
 
     @Override

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/DSAUtils.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/DSAUtils.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/DSAUtils.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/DSAUtils.java Mon Aug 12 10:28:33 2013
@@ -40,23 +40,23 @@ public class DSAUtils {
         byte rLength = asn1Bytes[3];
         int i;
 
-        for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--) ;
+        for (i = rLength; i > 0 && asn1Bytes[4 + rLength - i] == 0; i--) ;
 
         byte sLength = asn1Bytes[5 + rLength];
         int j;
 
-        for (j = sLength; (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--) ;
+        for (j = sLength; j > 0 && asn1Bytes[6 + rLength + sLength - j] == 0; j--) ;
 
-        if ((asn1Bytes[0] != 48)
-                || (asn1Bytes[1] != asn1Bytes.length - 2)
-                || (asn1Bytes[2] != 2) || (i > 20)
-                || (asn1Bytes[4 + rLength] != 2) || (j > 20)) {
+        if (asn1Bytes[0] != 48
+                || asn1Bytes[1] != asn1Bytes.length - 2
+                || asn1Bytes[2] != 2 || i > 20
+                || asn1Bytes[4 + rLength] != 2 || j > 20) {
             throw new IOException("Invalid ASN.1 format of DSA signature");
         } else {
             byte xmldsigBytes[] = new byte[40];
 
-            System.arraycopy(asn1Bytes, (4 + rLength) - i, xmldsigBytes, 20 - i, i);
-            System.arraycopy(asn1Bytes, (6 + rLength + sLength) - j, xmldsigBytes, 40 - j, j);
+            System.arraycopy(asn1Bytes, 4 + rLength - i, xmldsigBytes, 20 - i, i);
+            System.arraycopy(asn1Bytes, 6 + rLength + sLength - j, xmldsigBytes, 40 - j, j);
 
             return xmldsigBytes;
         }
@@ -79,7 +79,7 @@ public class DSAUtils {
 
         int i;
 
-        for (i = 20; (i > 0) && (xmldsigBytes[20 - i] == 0); i--) ;
+        for (i = 20; i > 0 && xmldsigBytes[20 - i] == 0; i--) ;
 
         int j = i;
 
@@ -89,7 +89,7 @@ public class DSAUtils {
 
         int k;
 
-        for (k = 20; (k > 0) && (xmldsigBytes[40 - k] == 0); k--) ;
+        for (k = 20; k > 0 && xmldsigBytes[40 - k] == 0; k--) ;
 
         int l = k;
 
@@ -104,12 +104,12 @@ public class DSAUtils {
         asn1Bytes[2] = 2;
         asn1Bytes[3] = (byte) j;
 
-        System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, (4 + j) - i, i);
+        System.arraycopy(xmldsigBytes, 20 - i, asn1Bytes, 4 + j - i, i);
 
         asn1Bytes[4 + j] = 2;
         asn1Bytes[5 + j] = (byte) l;
 
-        System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, (6 + j + l) - k, k);
+        System.arraycopy(xmldsigBytes, 40 - k, asn1Bytes, 6 + j + l - k, k);
 
         return asn1Bytes;
     }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/ECDSAUtils.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/ECDSAUtils.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/ECDSAUtils.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/ECDSAUtils.java Mon Aug 12 10:28:33 2013
@@ -65,13 +65,13 @@ public final class ECDSAUtils {
         byte rLength = asn1Bytes[offset + 1];
         int i;
 
-        for (i = rLength; (i > 0) && (asn1Bytes[(offset + 2 + rLength) - i] == 0); i--) ;
+        for (i = rLength; i > 0 && asn1Bytes[offset + 2 + rLength - i] == 0; i--) ;
 
         byte sLength = asn1Bytes[offset + 2 + rLength + 1];
         int j;
 
         for (j = sLength;
-             (j > 0) && (asn1Bytes[(offset + 2 + rLength + 2 + sLength) - j] == 0); j--)
+             j > 0 && asn1Bytes[offset + 2 + rLength + 2 + sLength - j] == 0; j--)
             ;
 
         int rawLen = Math.max(i, j);
@@ -84,8 +84,8 @@ public final class ECDSAUtils {
         }
         byte xmldsigBytes[] = new byte[2 * rawLen];
 
-        System.arraycopy(asn1Bytes, (offset + 2 + rLength) - i, xmldsigBytes, rawLen - i, i);
-        System.arraycopy(asn1Bytes, (offset + 2 + rLength + 2 + sLength) - j, xmldsigBytes,
+        System.arraycopy(asn1Bytes, offset + 2 + rLength - i, xmldsigBytes, rawLen - i, i);
+        System.arraycopy(asn1Bytes, offset + 2 + rLength + 2 + sLength - j, xmldsigBytes,
                 2 * rawLen - j, j);
 
         return xmldsigBytes;
@@ -109,7 +109,7 @@ public final class ECDSAUtils {
 
         int i;
 
-        for (i = rawLen; (i > 0) && (xmldsigBytes[rawLen - i] == 0); i--) ;
+        for (i = rawLen; i > 0 && xmldsigBytes[rawLen - i] == 0; i--) ;
 
         int j = i;
 
@@ -119,7 +119,7 @@ public final class ECDSAUtils {
 
         int k;
 
-        for (k = rawLen; (k > 0) && (xmldsigBytes[2 * rawLen - k] == 0); k--) ;
+        for (k = rawLen; k > 0 && xmldsigBytes[2 * rawLen - k] == 0; k--) ;
 
         int l = k;
 
@@ -146,14 +146,14 @@ public final class ECDSAUtils {
         asn1Bytes[offset++] = 2;
         asn1Bytes[offset++] = (byte) j;
 
-        System.arraycopy(xmldsigBytes, rawLen - i, asn1Bytes, (offset + j) - i, i);
+        System.arraycopy(xmldsigBytes, rawLen - i, asn1Bytes, offset + j - i, i);
 
         offset += j;
 
         asn1Bytes[offset++] = 2;
         asn1Bytes[offset++] = (byte) l;
 
-        System.arraycopy(xmldsigBytes, 2 * rawLen - k, asn1Bytes, (offset + l) - k, k);
+        System.arraycopy(xmldsigBytes, 2 * rawLen - k, asn1Bytes, offset + l - k, k);
 
         return asn1Bytes;
     }
@@ -884,7 +884,7 @@ public final class ECDSAUtils {
         byte affineYBytes[] = stripLeadingZeros(ecPoint.getAffineY().toByteArray());
         byte encodedBytes[] = new byte[size * 2 + 1];
         encodedBytes[0] = 0x04; //uncompressed
-        System.arraycopy(affineXBytes, 0, encodedBytes, (size - affineXBytes.length) + 1, affineXBytes.length);
+        System.arraycopy(affineXBytes, 0, encodedBytes, size - affineXBytes.length + 1, affineXBytes.length);
         System.arraycopy(affineYBytes, 0, encodedBytes, encodedBytes.length - affineYBytes.length, affineYBytes.length);
         return encodedBytes;
     }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverFilesystem.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverFilesystem.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverFilesystem.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverFilesystem.java Mon Aug 12 10:28:33 2013
@@ -51,7 +51,7 @@ public class ResolverFilesystem implemen
         if (uri == null) {
             return null;
         }
-        if (uri.startsWith("file:") || (baseURI != null && baseURI.startsWith("file:"))) {
+        if (uri.startsWith("file:") || baseURI != null && baseURI.startsWith("file:")) {
             return this;
         }
         return null;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverHttp.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverHttp.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverHttp.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/resourceResolvers/ResolverHttp.java Mon Aug 12 10:28:33 2013
@@ -59,7 +59,7 @@ public class ResolverHttp implements Res
         if (uri == null) {
             return null;
         }
-        if (pattern.matcher(uri).matches() || (baseURI != null && pattern.matcher(baseURI).matches())) {
+        if (pattern.matcher(uri).matches() || baseURI != null && pattern.matcher(baseURI).matches()) {
             return this;
         }
         return null;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java Mon Aug 12 10:28:33 2013
@@ -135,7 +135,7 @@ public class XMLSecNamespaceImpl extends
 
     @Override
     public boolean isDefaultNamespaceDeclaration() {
-        return (prefix.length() == 0);
+        return prefix.length() == 0;
     }
 
     @Override

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/Canonicalizer20010315_Excl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/Canonicalizer20010315_Excl.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/Canonicalizer20010315_Excl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/Canonicalizer20010315_Excl.java Mon Aug 12 10:28:33 2013
@@ -48,7 +48,7 @@ public abstract class Canonicalizer20010
 
     protected static ArrayList<String> getPrefixList(List<String> inclusiveNamespaces) {
 
-        if ((inclusiveNamespaces == null) || (inclusiveNamespaces.isEmpty())) {
+        if (inclusiveNamespaces == null || inclusiveNamespaces.isEmpty()) {
             return null;
         }
 
@@ -117,7 +117,7 @@ public abstract class Canonicalizer20010
                 //resultNamespace means the prefix matched. so check the ns further
                 if (resultNamespace == null || resultNamespace.getNamespaceURI() == null
                         || !resultNamespace.getNamespaceURI().equals(comparableNamespace.getNamespaceURI())
-                        || (firstCall && propagateDefaultNamespace && !utilizedNamespaces.contains(comparableNamespace))) {
+                        || firstCall && propagateDefaultNamespace && !utilizedNamespaces.contains(comparableNamespace)) {
 
                     if (utilizedNamespaces == Collections.<XMLSecNamespace>emptyList()) {
                         utilizedNamespaces = new ArrayList<XMLSecNamespace>(2);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/TrimmerOutputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/TrimmerOutputStream.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/TrimmerOutputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/TrimmerOutputStream.java Mon Aug 12 10:28:33 2013
@@ -94,7 +94,7 @@ public class TrimmerOutputStream extends
         if (len >= (buffer.length - bufferedCount)) {
             out.write(buffer, 0, bufferedCount);
             out.write(b, off, len - endTrimLength);
-            System.arraycopy(b, (off + len) - endTrimLength, buffer, 0, endTrimLength);
+            System.arraycopy(b, off + len - endTrimLength, buffer, 0, endTrimLength);
             bufferedCount = endTrimLength;
             return;
         }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/Base64.java Mon Aug 12 10:28:33 2013
@@ -116,8 +116,8 @@ public class Base64 {
 
         byte[] bigBytes = big.toByteArray();
 
-        if (((big.bitLength() % 8) != 0)
-            && (((big.bitLength() / 8) + 1) == (bitlen / 8))) {
+        if (big.bitLength() % 8 != 0
+            && big.bitLength() / 8 + 1 == bitlen / 8) {
             return bigBytes;
         }
 
@@ -125,7 +125,7 @@ public class Base64 {
         int startSrc = 0;    // no need to skip anything
         int bigLen = bigBytes.length;    //valid length of the string
 
-        if ((big.bitLength() % 8) == 0) {    // correct values
+        if (big.bitLength() % 8 == 0) {    // correct values
             startSrc = 1;    // skip sign bit
 
             bigLen--;    // valid length of the string
@@ -171,8 +171,8 @@ public class Base64 {
 
         byte[] bigBytes = big.toByteArray();
 
-        if (((big.bitLength() % 8) != 0)
-            && (((big.bitLength() / 8) + 1) == (bitlen / 8))) {
+        if (big.bitLength() % 8 != 0
+            && big.bitLength() / 8 + 1 == bitlen / 8) {
             return bigBytes;
         }
 
@@ -180,7 +180,7 @@ public class Base64 {
         int startSrc = 0;    // no need to skip anything
         int bigLen = bigBytes.length;    //valid length of the string
 
-        if ((big.bitLength() % 8) == 0) {    // correct values
+        if (big.bitLength() % 8 == 0) {    // correct values
             startSrc = 1;    // skip sign bit
 
             bigLen--;    // valid length of the string
@@ -338,12 +338,12 @@ public class Base64 {
         return retBytes;
     }
 
-    protected static final boolean isWhiteSpace(byte octect) {
-        return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
+    protected static final boolean isWhiteSpace(byte octet) {
+        return octet == 0x20 || octet == 0xd || octet == 0xa || octet == 0x9;
     }
 
-    protected static final boolean isPad(byte octect) {
-        return (octect == PAD);
+    protected static final boolean isPad(byte octet) {
+        return octet == PAD;
     }
 
     /**
@@ -360,7 +360,7 @@ public class Base64 {
      * @param length <code>int<code> length of wrapped lines; No wrapping if less than 4.
      * @return a <code>String</code> with encoded data
      */
-    public static final String  encode(byte[] binaryData,int length) {
+    public static final String  encode(byte[] binaryData, int length) {
         if (length < 4) {
             length = Integer.MAX_VALUE;
         }
@@ -503,7 +503,7 @@ public class Base64 {
             //should be divisible by four
         }
 
-        int numberQuadruple = (len / FOURBYTE);
+        int numberQuadruple = len / FOURBYTE;
 
         if (numberQuadruple == 0) {
             return new byte[0];
@@ -522,7 +522,7 @@ public class Base64 {
         //first last bits.
         b1 = base64Alphabet[base64Data[dataIndex++]];
         b2 = base64Alphabet[base64Data[dataIndex++]];
-        if ((b1==-1) || (b2==-1)) {
+        if (b1 == -1 || b2 == -1) {
              //if found "no data" just return null
             throw new Base64DecodingException("decoding.general");
         }
@@ -531,7 +531,7 @@ public class Base64 {
         byte d3, d4;
         b3 = base64Alphabet[d3 = base64Data[dataIndex++]];
         b4 = base64Alphabet[d4 = base64Data[dataIndex++]];
-        if ((b3 == -1) || (b4 == -1) ) {
+        if (b3 == -1 || b4 == -1) {
             //Check if they are PAD characters
             if (isPad(d3) && isPad(d4)) {               //Two PAD e.g. 3c[Pad][Pad]
                 if ((b2 & 0xf) != 0) { //last 4 bits should be zero
@@ -566,10 +566,7 @@ public class Base64 {
             b3 = base64Alphabet[base64Data[dataIndex++]];
             b4 = base64Alphabet[base64Data[dataIndex++]];
 
-            if ((b1 == -1) ||
-                (b2 == -1) ||
-                (b3 == -1) ||
-                (b4 == -1)) {
+            if (b1 == -1 || b2 == -1 || b3 == -1 || b4 == -1) {
                 //if found "no data" just return null   
                 throw new Base64DecodingException("decoding.general");
             }
@@ -621,7 +618,7 @@ public class Base64 {
             //should be divisible by four
         }
 
-        int numberQuadruple = (len / FOURBYTE);
+        int numberQuadruple = len / FOURBYTE;
 
         if (numberQuadruple == 0) {
             return;
@@ -639,10 +636,7 @@ public class Base64 {
             b2 = base64Alphabet[base64Data[dataIndex++]];
             b3 = base64Alphabet[base64Data[dataIndex++]];
             b4 = base64Alphabet[base64Data[dataIndex++]];
-            if ((b1 == -1) ||
-                (b2 == -1) ||
-                (b3 == -1) ||
-                (b4 == -1)) {
+            if (b1 == -1 || b2 == -1 || b3 == -1 || b4 == -1) {
                 //if found "no data" just return null
                 throw new Base64DecodingException("decoding.general");
             }
@@ -655,7 +649,7 @@ public class Base64 {
         b2 = base64Alphabet[base64Data[dataIndex++]];
 
         //  first last bits.
-        if ((b1 == -1) || (b2 == -1) ) {
+        if (b1 == -1 || b2 == -1) {
             //if found "no data" just return null
             throw new Base64DecodingException("decoding.general");
         }
@@ -663,7 +657,7 @@ public class Base64 {
         byte d3, d4;
         b3 = base64Alphabet[d3 = base64Data[dataIndex++]];
         b4 = base64Alphabet[d4 = base64Data[dataIndex++]];
-        if ((b3 == -1 ) || (b4 == -1) ) { //Check if they are PAD characters
+        if (b3 == -1 || b4 == -1) { //Check if they are PAD characters
             if (isPad(d3) && isPad(d4)) {               //Two PAD e.g. 3c[Pad][Pad]
                 if ((b2 & 0xf) != 0) { //last 4 bits should be zero
                     throw new Base64DecodingException("decoding.general");
@@ -741,7 +735,7 @@ public class Base64 {
         b2 = base64Alphabet[d2];
         b3 = base64Alphabet[d3];
         b4 = base64Alphabet[d4];
-        if ((b3 == -1) || (b4 == -1)) { //Check if they are PAD characters
+        if (b3 == -1 || b4 == -1) { //Check if they are PAD characters
             if (isPad(d3) && isPad(d4)) {               //Two PAD e.g. 3c[Pad][Pad]
                 if ((b2 & 0xf) != 0) { //last 4 bits should be zero
                     throw new Base64DecodingException("decoding.general");

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java Mon Aug 12 10:28:33 2013
@@ -68,7 +68,7 @@ public class RFC2253Parser {
      */
     public static String normalize(String dn, boolean toXml) {
         //if empty string
-        if ((dn == null) || dn.equals("")) {
+        if (dn == null || dn.equals("")) {
             return "";
         }
 
@@ -83,7 +83,7 @@ public class RFC2253Parser {
             for (int j = 0; (k = DN.indexOf(',', j)) >= 0; j = k + 1) {
                 l += countQuotes(DN, j, k);
 
-                if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) {
+                if (k > 0 && DN.charAt(k - 1) != '\\' && (l % 2) == 0) {
                     sb.append(parseRDN(DN.substring(i, k).trim(), toXml)).append(",");
 
                     i = k + 1;
@@ -116,7 +116,7 @@ public class RFC2253Parser {
         for (int j = 0; (k = str.indexOf('+', j)) >= 0; j = k + 1) {
             l += countQuotes(str, j, k);
 
-            if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
+            if (k > 0 && str.charAt(k - 1) != '\\' && (l % 2) == 0) {
                 sb.append(parseATAV(trim(str.substring(i, k)), toXml)).append("+");
 
                 i = k + 1;
@@ -140,7 +140,7 @@ public class RFC2253Parser {
     static String parseATAV(String str, boolean toXml) throws IOException {
         int i = str.indexOf('=');
 
-        if ((i == -1) || ((i > 0) && (str.charAt(i - 1) == '\\'))) {
+        if (i == -1 || i > 0 && str.charAt(i - 1) == '\\') {
             return str;
         } 
         String attrType = normalizeAT(str.substring(0, i));
@@ -194,8 +194,8 @@ public class RFC2253Parser {
                 c = (char) i;
 
                 //the following char is defined at 4.Relationship with RFC1779 and LDAPv2 inrfc2253
-                if ((c == ',') || (c == '=') || (c == '+') || (c == '<')
-                    || (c == '>') || (c == '#') || (c == ';')) {
+                if (c == ',' || c == '=' || c == '+' || c == '<'
+                    || c == '>' || c == '#' || c == ';') {
                     sb.append('\\');
                 }
 
@@ -273,10 +273,10 @@ public class RFC2253Parser {
                 char c2 = (char) sr.read();
 
                 //65 (A) 97 (a)
-                if ((((c1 >= 48) && (c1 <= 57)) || ((c1 >= 65) && (c1 <= 70)) || ((c1 >= 97) && (c1 <= 102)))
-                    && (((c2 >= 48) && (c2 <= 57))
-                        || ((c2 >= 65) && (c2 <= 70))
-                        || ((c2 >= 97) && (c2 <= 102)))) {
+                if ((c1 >= 48 && c1 <= 57 || c1 >= 65 && c1 <= 70 || c1 >= 97 && c1 <= 102)
+                    && (c2 >= 48 && c2 <= 57
+                        || c2 >= 65 && c2 <= 70
+                        || c2 >= 97 && c2 <= 102)) {
                     char ch = (char) Byte.parseByte("" + c1 + c2, 16);
 
                     sb.append(ch);
@@ -413,7 +413,7 @@ public class RFC2253Parser {
         for (int j = 0; (k = str.indexOf(symbol, j)) >= 0; j = k + 1) {
             l += countQuotes(str, j, k);
 
-            if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
+            if (k > 0 && str.charAt(k - 1) != '\\' && (l % 2) == 0) {
                 sb.append(trim(str.substring(i, k))).append(replace);
 
                 i = k + 1;
@@ -459,8 +459,8 @@ public class RFC2253Parser {
         String trimed = str.trim();
         int i = str.indexOf(trimed) + trimed.length();
 
-        if ((str.length() > i) && trimed.endsWith("\\")
-            && !trimed.endsWith("\\\\") && (str.charAt(i) == ' ')) {
+        if (str.length() > i && trimed.endsWith("\\")
+            && !trimed.endsWith("\\\\") && str.charAt(i) == ' ') {
             trimed = trimed + " ";
         }
 

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/UnsyncByteArrayOutputStream.java Mon Aug 12 10:28:33 2013
@@ -62,7 +62,7 @@ public class UnsyncByteArrayOutputStream
     }
 
     public void write(int arg0) {
-        if ((Integer.MAX_VALUE - pos) == 0) {
+        if (Integer.MAX_VALUE - pos == 0) {
             throw new OutOfMemoryError();
         }
         int newPos = pos + 1;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/XMLUtils.java Mon Aug 12 10:28:33 2013
@@ -105,7 +105,7 @@ public class XMLUtils {
     
     public static Element getNextElement(Node el) {
         Node node = el;
-        while ((node != null) && (node.getNodeType() != Node.ELEMENT_NODE)) {
+        while (node != null && node.getNodeType() != Node.ELEMENT_NODE) {
             node = node.getNextSibling();
         }
         return (Element)node;
@@ -118,7 +118,7 @@ public class XMLUtils {
      * @param com whether comments or not
      */   
     public static void getSet(Node rootNode, Set<Node> result, Node exclude, boolean com) {
-        if ((exclude != null) && isDescendantOrSelf(exclude, rootNode)) {
+        if (exclude != null && isDescendantOrSelf(exclude, rootNode)) {
             return;
         }
         getSetRec(rootNode, result, exclude, com);
@@ -145,7 +145,7 @@ public class XMLUtils {
             for (Node r = rootNode.getFirstChild(); r != null; r = r.getNextSibling()) {                                    
                 if (r.getNodeType() == Node.TEXT_NODE) {
                     result.add(r); 
-                    while ((r != null) && (r.getNodeType() == Node.TEXT_NODE)) {
+                    while (r != null && r.getNodeType() == Node.TEXT_NODE) {
                         r = r.getNextSibling();
                     }
                     if (r == null) {
@@ -280,7 +280,7 @@ public class XMLUtils {
             throw new RuntimeException("Document is null");
         }
 
-        if ((dsPrefix == null) || (dsPrefix.length() == 0)) {
+        if (dsPrefix == null || dsPrefix.length() == 0) {
             return doc.createElementNS(Constants.SignatureSpecNS, elementName);
         } 
         return doc.createElementNS(Constants.SignatureSpecNS, dsPrefix + ":" + elementName);
@@ -298,7 +298,7 @@ public class XMLUtils {
             throw new RuntimeException("Document is null");
         }
 
-        if ((ds11Prefix == null) || (ds11Prefix.length() == 0)) {
+        if (ds11Prefix == null || ds11Prefix.length() == 0) {
             return doc.createElementNS(Constants.SignatureSpec11NS, elementName);
         } 
         return doc.createElementNS(Constants.SignatureSpec11NS, ds11Prefix + ":" + elementName);
@@ -316,7 +316,7 @@ public class XMLUtils {
             throw new RuntimeException("Document is null");
         }
 
-        if ((xencPrefix == null) || (xencPrefix.length() == 0)) {
+        if (xencPrefix == null || xencPrefix.length() == 0) {
             return doc.createElementNS(EncryptionConstants.EncryptionSpecNS, elementName);
         }
         return 
@@ -337,7 +337,7 @@ public class XMLUtils {
             throw new RuntimeException("Document is null");
         }
 
-        if ((xenc11Prefix == null) || (xenc11Prefix.length() == 0)) {
+        if (xenc11Prefix == null || xenc11Prefix.length() == 0) {
             return doc.createElementNS(EncryptionConstants.EncryptionSpec11NS, elementName);
         }
         return 
@@ -478,7 +478,7 @@ public class XMLUtils {
      * @return the element.
      */
     public static Element createDSctx(Document doc, String prefix, String namespace) {
-        if ((prefix == null) || (prefix.trim().length() == 0)) {
+        if (prefix == null || prefix.trim().length() == 0) {
             throw new IllegalArgumentException("You must supply a prefix");
         }
 
@@ -614,7 +614,7 @@ public class XMLUtils {
                 sibling = node.getFirstChild();
                 break;
             }
-            while ((sibling == null) && (parent != null)) {
+            while (sibling == null && parent != null) {
                 sibling = parent.getNextSibling();
                 parent = parent.getParentNode();
             }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java Mon Aug 12 10:28:33 2013
@@ -94,7 +94,7 @@ public class ResourceResolver {
                     );
                 }
     
-                if ((resolverTmp != null) && resolverTmp.canResolve(context)) {
+                if (resolverTmp != null && resolverTmp.canResolve(context)) {
                     // Check to see whether the Resolver is allowed
                     if (context.secureValidation 
                         && (resolverTmp.resolverSpi instanceof ResolverLocalFilesystem
@@ -109,8 +109,8 @@ public class ResourceResolver {
             }
         }
         
-        Object exArgs[] = { ((context.uriToResolve != null)
-                ? context.uriToResolve : "null"), context.baseUri };
+        Object exArgs[] = { context.uriToResolve != null
+                ? context.uriToResolve : "null", context.baseUri };
 
         throw new ResourceResolverException("utils.resolver.noClass", exArgs, context.uriToResolve, context.baseUri);
     }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/ResourceResolverSpi.java Mon Aug 12 10:28:33 2013
@@ -34,7 +34,7 @@ public abstract class ResourceResolverSp
         org.slf4j.LoggerFactory.getLogger(ResourceResolverSpi.class);
 
     /** Field properties */
-    protected java.util.Map<String, String> properties = null;
+    protected Map<String, String> properties = null;
 
     /**
      * This is the workhorse method used to resolve resources.
@@ -160,9 +160,9 @@ public abstract class ResourceResolverSp
             char ch1 = str.charAt(1);
             char ch2 = str.charAt(2);
             char ch3 = str.charAt(3);
-            boolean isDosFilename = ((('A' <= ch0) && (ch0 <= 'Z'))
-                && (ch1 == ':') && (ch2 == '/')
-                && (ch3 != '/'));
+            boolean isDosFilename = 'A' <= ch0 && ch0 <= 'Z'
+                && ch1 == ':' && ch2 == '/'
+                && ch3 != '/';
 
             if (isDosFilename && log.isDebugEnabled()) {
                 log.debug("Found DOS filename: " + str);
@@ -176,7 +176,7 @@ public abstract class ResourceResolverSp
             if (ch1 == ':') {
                 char ch0 = Character.toUpperCase(str.charAt(0));
 
-                if (('A' <= ch0) && (ch0 <= 'Z')) {
+                if ('A' <= ch0 && ch0 <= 'Z') {
                     str = "/" + str;
                 }
             }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java Mon Aug 12 10:28:33 2013
@@ -121,7 +121,7 @@ public class ResolverDirectHTTP extends 
                 String pass =
                     engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpBasicPass]);
 
-                if ((user != null) && (pass != null)) {
+                if (user != null && pass != null) {
                     urlConnection = openConnection(url);
 
                     String password = user + ":" + pass;
@@ -178,7 +178,7 @@ public class ResolverDirectHTTP extends 
                 engineGetProperty(ResolverDirectHTTP.properties[ResolverDirectHTTP.HttpProxyPass]);
 
         Proxy proxy = null;
-        if ((proxyHostProp != null) && (proxyPortProp != null)) {
+        if (proxyHostProp != null && proxyPortProp != null) {
             int port = Integer.parseInt(proxyPortProp);
             proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHostProp, port));
         }
@@ -187,7 +187,7 @@ public class ResolverDirectHTTP extends 
         if (proxy != null) {
             urlConnection = url.openConnection(proxy);
 
-            if ((proxyUser != null) && (proxyPass != null)) {
+            if (proxyUser != null && proxyPass != null) {
                 String password = proxyUser + ":" + proxyPass;
                 String authString = "Basic " + Base64.encode(password.getBytes("ISO-8859-1"));
 
@@ -215,7 +215,7 @@ public class ResolverDirectHTTP extends 
             return false;
         }
 
-        if (context.uriToResolve.equals("") || (context.uriToResolve.charAt(0)=='#')) {
+        if (context.uriToResolve.equals("") || context.uriToResolve.charAt(0) == '#') {
             if (log.isDebugEnabled()) {
                 log.debug("quick fail for empty URIs and local ones");
             }
@@ -227,7 +227,7 @@ public class ResolverDirectHTTP extends 
         }
 
         if (context.uriToResolve.startsWith("http:") ||
-            (context.baseUri != null && context.baseUri.startsWith("http:") )) {
+            context.baseUri != null && context.baseUri.startsWith("http:")) {
             if (log.isDebugEnabled()) {
                 log.debug("I state that I can resolve " + context.uriToResolve);
             }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverFragment.java Mon Aug 12 10:28:33 2013
@@ -129,7 +129,7 @@ public class ResolverFragment extends Re
         }
         
         if (context.uriToResolve.equals("") || 
-            ((context.uriToResolve.charAt(0) == '#') && !context.uriToResolve.startsWith("#xpointer("))
+            context.uriToResolve.charAt(0) == '#' && !context.uriToResolve.startsWith("#xpointer(")
         ) {
             if (log.isDebugEnabled()) {
                 log.debug("State I can resolve reference: \"" + context.uriToResolve + "\"");

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverLocalFilesystem.java Mon Aug 12 10:28:33 2013
@@ -108,7 +108,7 @@ public class ResolverLocalFilesystem ext
             return false;
         }
 
-        if (context.uriToResolve.equals("") || (context.uriToResolve.charAt(0)=='#') ||
+        if (context.uriToResolve.equals("") || context.uriToResolve.charAt(0) == '#' ||
             context.uriToResolve.startsWith("http:")) {
             return false;
         }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java?rev=1513098&r1=1513097&r2=1513098&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/resolver/implementations/ResolverXPointer.java Mon Aug 12 10:28:33 2013
@@ -141,8 +141,8 @@ public class ResolverXPointer extends Re
             String idPlusDelim = uri.substring(XP_LENGTH, uri.length() - 2);
 
             int idLen = idPlusDelim.length() -1;
-            if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim.charAt(idLen) == '"')) 
-                || ((idPlusDelim.charAt(0) == '\'') && (idPlusDelim.charAt(idLen) == '\''))) {
+            if (idPlusDelim.charAt(0) == '"' && idPlusDelim.charAt(idLen) == '"' 
+                || idPlusDelim.charAt(0) == '\'' && idPlusDelim.charAt(idLen) == '\'') {
                 if (log.isDebugEnabled()) {
                     log.debug("Id = " + idPlusDelim.substring(1, idLen));
                 }
@@ -164,8 +164,8 @@ public class ResolverXPointer extends Re
             String idPlusDelim = uri.substring(XP_LENGTH,uri.length() - 2);
             
             int idLen = idPlusDelim.length() -1;
-            if (((idPlusDelim.charAt(0) == '"') && (idPlusDelim.charAt(idLen) == '"')) 
-                || ((idPlusDelim.charAt(0) == '\'') && (idPlusDelim.charAt(idLen) == '\''))) {
+            if (idPlusDelim.charAt(0) == '"' && idPlusDelim.charAt(idLen) == '"' 
+                || idPlusDelim.charAt(0) == '\'' && idPlusDelim.charAt(idLen) == '\'') {
                 return idPlusDelim.substring(1, idLen);
             }
         }