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 2017/03/02 09:45:46 UTC

svn commit: r1785092 - in /santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security: ./ algorithms/ algorithms/implementations/ c14n/implementations/ encryption/ signature/ stax/impl/ stax/impl/processor/input/ stax/impl/processor/output...

Author: coheigea
Date: Thu Mar  2 09:45:46 2017
New Revision: 1785092

URL: http://svn.apache.org/viewvc?rev=1785092&view=rev
Log:
More work on removing unnecessary log statements

Modified:
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Manifest.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java Thu Mar  2 09:45:46 2017
@@ -110,9 +110,7 @@ public class Init {
         //
         I18n.init("en", "US");
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Registering default algorithms");
-        }
+        LOG.debug("Registering default algorithms");
         try {
             AccessController.doPrivileged(new PrivilegedExceptionAction<Void>(){
                 @Override public Void run() throws XMLSecurityException {
@@ -211,9 +209,7 @@ public class Init {
                             element.getAttributeNS(null, "JAVACLASS");
                         try {
                             Canonicalizer.register(uri, javaClass);
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Canonicalizer.register(" + uri + ", " + javaClass + ")");
-                            }
+                            LOG.debug("Canonicalizer.register({}, {})", uri, javaClass);
                         } catch (ClassNotFoundException e) {
                             Object exArgs[] = { uri, javaClass };
                             LOG.error(I18n.translate("algorithm.classDoesNotExist", exArgs));
@@ -231,9 +227,7 @@ public class Init {
                             element.getAttributeNS(null, "JAVACLASS");
                         try {
                             Transform.register(uri, javaClass);
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Transform.register(" + uri + ", " + javaClass + ")");
-                            }
+                            LOG.debug("Transform.register({}, {})", uri, javaClass);
                         } catch (ClassNotFoundException e) {
                             Object exArgs[] = { uri, javaClass };
 
@@ -269,10 +263,7 @@ public class Init {
 
                         try {
                             SignatureAlgorithm.register(uri, javaClass);
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("SignatureAlgorithm.register(" + uri + ", "
-                                          + javaClass + ")");
-                            }
+                            LOG.debug("SignatureAlgorithm.register({}, {})", uri, javaClass);
                         } catch (ClassNotFoundException e) {
                             Object exArgs[] = { uri, javaClass };
 
@@ -292,15 +283,9 @@ public class Init {
                             element.getAttributeNS(null, "DESCRIPTION");
 
                         if (description != null && description.length() > 0) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Register Resolver: " + javaClass + ": "
-                                          + description);
-                            }
+                            LOG.debug("Register Resolver: {}: {}", javaClass, description);
                         } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Register Resolver: " + javaClass
-                                          + ": For unknown purposes");
-                            }
+                            LOG.debug("Register Resolver: {}: For unknown purposes", javaClass);
                         }
                         try {
                             ResourceResolver.register(javaClass);
@@ -325,15 +310,9 @@ public class Init {
                             element.getAttributeNS(null, "DESCRIPTION");
 
                         if (description != null && description.length() > 0) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Register Resolver: " + javaClass + ": "
-                                          + description);
-                            }
+                            LOG.debug("Register Resolver: {}: {}", javaClass, description);
                         } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("Register Resolver: " + javaClass
-                                          + ": For unknown purposes");
-                            }
+                            LOG.debug("Register Resolver: {}: For unknown purposes", javaClass);
                         }
                         classNames.add(javaClass);
                     }
@@ -342,9 +321,7 @@ public class Init {
 
 
                 if ("PrefixMappings".equals(tag)){
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("Now I try to bind prefixes:");
-                    }
+                    LOG.debug("Now I try to bind prefixes:");
 
                     Element[] nl =
                         XMLUtils.selectNodes(el.getFirstChild(), CONF_NS, "PrefixMapping");
@@ -352,9 +329,7 @@ public class Init {
                     for (Element element : nl) {
                         String namespace = element.getAttributeNS(null, "namespace");
                         String prefix = element.getAttributeNS(null, "prefix");
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Now I try to bind " + prefix + " to " + namespace);
-                        }
+                        LOG.debug("Now I try to bind {} to {}", prefix, namespace);
                         ElementProxy.setDefaultPrefix(namespace, prefix);
                     }
                 }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java Thu Mar  2 09:45:46 2017
@@ -394,9 +394,7 @@ public class JCEMapper {
      * @return The Algorithm object for the given URI.
      */
     private static Algorithm getAlgorithm(String algorithmURI) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Request for URI " + algorithmURI);
-        }
+        LOG.debug("Request for URI {}", algorithmURI);
 
         if (algorithmURI != null) {
             return algorithmsMap.get(algorithmURI);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/SignatureAlgorithm.java Thu Mar  2 09:45:46 2017
@@ -144,10 +144,7 @@ public class SignatureAlgorithm extends
         try {
             Class<? extends SignatureAlgorithmSpi> implementingClass =
                 algorithmHash.get(algorithmURI);
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Create URI \"" + algorithmURI + "\" class \""
-                   + implementingClass + "\"");
-            }
+            LOG.debug("Create URI \"{}\" class \"{}\"", algorithmURI, implementingClass);
             return implementingClass.newInstance();
         }  catch (IllegalAccessException ex) {
             Object exArgs[] = { algorithmURI, ex.getMessage() };
@@ -326,9 +323,7 @@ public class SignatureAlgorithm extends
        throws AlgorithmAlreadyRegisteredException, ClassNotFoundException,
            XMLSignatureException {
         JavaUtils.checkRegisterPermission();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Try to register " + algorithmURI + " " + implementingClass);
-        }
+        LOG.debug("Try to register {} {}", algorithmURI, implementingClass);
 
         // are we already registered?
         Class<? extends SignatureAlgorithmSpi> registeredClass = algorithmHash.get(algorithmURI);
@@ -364,9 +359,7 @@ public class SignatureAlgorithm extends
        throws AlgorithmAlreadyRegisteredException, ClassNotFoundException,
            XMLSignatureException {
         JavaUtils.checkRegisterPermission();
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Try to register " + algorithmURI + " " + implementingClass);
-        }
+        LOG.debug("Try to register {} {}", algorithmURI, implementingClass);
 
         // are we already registered?
         Class<? extends SignatureAlgorithmSpi> registeredClass = algorithmHash.get(algorithmURI);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/IntegrityHmac.java Thu Mar  2 09:45:46 2017
@@ -69,9 +69,7 @@ public abstract class IntegrityHmac exte
      */
     public IntegrityHmac() throws XMLSignatureException {
         String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Created IntegrityHmacSHA1 using " + algorithmID);
-        }
+        LOG.debug("Created IntegrityHmacSHA1 using {}", algorithmID);
 
         try {
             this.macAlgorithm = Mac.getInstance(algorithmID);
@@ -111,9 +109,7 @@ public abstract class IntegrityHmac exte
     protected boolean engineVerify(byte[] signature) throws XMLSignatureException {
         try {
             if (this.HMACOutputLengthSet && this.HMACOutputLength < getDigestLength()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("HMACOutputLength must not be less than " + getDigestLength());
-                }
+                LOG.debug("HMACOutputLength must not be less than {}", getDigestLength());
                 Object[] exArgs = { String.valueOf(getDigestLength()) };
                 throw new XMLSignatureException("algorithms.HMACOutputLengthMin", exArgs);
             } else {
@@ -154,9 +150,7 @@ public abstract class IntegrityHmac exte
                 this.macAlgorithm = Mac.getInstance(macAlgorithm.getAlgorithm());
             } catch (Exception e) {
                 // this shouldn't occur, but if it does, restore previous Mac
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Exception when reinstantiating Mac:" + e);
-                }
+                LOG.debug("Exception when reinstantiating Mac: {}", e);
                 this.macAlgorithm = mac;
             }
             throw new XMLSignatureException(ex);
@@ -173,9 +167,7 @@ public abstract class IntegrityHmac exte
     protected byte[] engineSign() throws XMLSignatureException {
         try {
             if (this.HMACOutputLengthSet && this.HMACOutputLength < getDigestLength()) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("HMACOutputLength must not be less than " + getDigestLength());
-                }
+                LOG.debug("HMACOutputLength must not be less than {}", getDigestLength());
                 Object[] exArgs = { String.valueOf(getDigestLength()) };
                 throw new XMLSignatureException("algorithms.HMACOutputLengthMin", exArgs);
             } else {

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureBaseRSA.java Thu Mar  2 09:45:46 2017
@@ -53,9 +53,7 @@ public abstract class SignatureBaseRSA e
     public SignatureBaseRSA() throws XMLSignatureException {
         String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Created SignatureRSA using " + algorithmID);
-        }
+        LOG.debug("Created SignatureRSA using {}", algorithmID);
         String provider = JCEMapper.getProviderId();
         try {
             if (provider == null) {
@@ -117,9 +115,7 @@ public abstract class SignatureBaseRSA e
             } catch (Exception e) {
                 // this shouldn't occur, but if it does, restore previous
                 // Signature
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Exception when reinstantiating Signature:" + e);
-                }
+                LOG.debug("Exception when reinstantiating Signature: {}", e);
                 this.signatureAlgorithm = sig;
             }
             throw new XMLSignatureException(ex);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureDSA.java Thu Mar  2 09:45:46 2017
@@ -67,9 +67,7 @@ public class SignatureDSA extends Signat
      */
     public SignatureDSA() throws XMLSignatureException {
         String algorithmID = JCEMapper.translateURItoJCEID(engineGetURI());
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Created SignatureDSA using " + algorithmID);
-        }
+        LOG.debug("Created SignatureDSA using {}", algorithmID);
 
         String provider = JCEMapper.getProviderId();
         try {
@@ -147,9 +145,7 @@ public class SignatureDSA extends Signat
             } catch (Exception e) {
                 // this shouldn't occur, but if it does, restore previous
                 // Signature
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Exception when reinstantiating Signature:" + e);
-                }
+                LOG.debug("Exception when reinstantiating Signature: {}", e);
                 this.signatureAlgorithm = sig;
             }
             throw new XMLSignatureException(ex);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/implementations/SignatureECDSA.java Thu Mar  2 09:45:46 2017
@@ -95,9 +95,7 @@ public abstract class SignatureECDSA ext
 
         String algorithmID = JCEMapper.translateURItoJCEID(this.engineGetURI());
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Created SignatureECDSA using " + algorithmID);
-        }
+        LOG.debug("Created SignatureECDSA using {}", algorithmID);
         String provider = JCEMapper.getProviderId();
         try {
             if (provider == null) {
@@ -168,9 +166,7 @@ public abstract class SignatureECDSA ext
             } catch (Exception e) {
                 // this shouldn't occur, but if it does, restore previous
                 // Signature
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Exception when reinstantiating Signature:" + e);
-                }
+                LOG.debug("Exception when reinstantiating Signature: {}", e);
                 this.signatureAlgorithm = sig;
             }
             throw new XMLSignatureException(ex);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java Thu Mar  2 09:45:46 2017
@@ -165,9 +165,7 @@ public abstract class Canonicalizer11 ex
                         try {
                             base = joinURI(n.getValue(), base);
                         } catch (URISyntaxException ue) {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug(ue.getMessage(), ue);
-                            }
+                            LOG.debug(ue.getMessage(), ue);
                         }
                     }
                 }
@@ -530,9 +528,7 @@ public abstract class Canonicalizer11 ex
     }
 
     private static String removeDotSegments(String path) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("STEP OUTPUT BUFFER\t\tINPUT BUFFER");
-        }
+        LOG.debug("STEP OUTPUT BUFFER\t\tINPUT BUFFER");
 
         // 1. The input buffer is initialized with the now-appended path
         // components then replace occurrences of "//" in the input buffer

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java Thu Mar  2 09:45:46 2017
@@ -323,9 +323,7 @@ public class XMLCipher {
         String canonAlg,
         String digestMethod
     ) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Constructing XMLCipher...");
-        }
+        LOG.debug("Constructing XMLCipher...");
 
         factory = new Factory();
 
@@ -439,9 +437,7 @@ public class XMLCipher {
      * @see javax.crypto.Cipher#getInstance(java.lang.String)
      */
     public static XMLCipher getInstance(String transformation) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation");
-        }
+        LOG.debug("Getting XMLCipher with transformation");
         validateTransformation(transformation);
         return new XMLCipher(transformation, null, null, null);
     }
@@ -461,9 +457,7 @@ public class XMLCipher {
      */
     public static XMLCipher getInstance(String transformation, String canon)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation and c14n algorithm");
-        }
+        LOG.debug("Getting XMLCipher with transformation and c14n algorithm");
         validateTransformation(transformation);
         return new XMLCipher(transformation, null, canon, null);
     }
@@ -484,9 +478,7 @@ public class XMLCipher {
      */
     public static XMLCipher getInstance(String transformation, String canon, String digestMethod)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation and c14n algorithm");
-        }
+        LOG.debug("Getting XMLCipher with transformation and c14n algorithm");
         validateTransformation(transformation);
         return new XMLCipher(transformation, null, canon, digestMethod);
     }
@@ -502,9 +494,7 @@ public class XMLCipher {
      */
     public static XMLCipher getProviderInstance(String transformation, String provider)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation and provider");
-        }
+        LOG.debug("Getting XMLCipher with transformation and provider");
         if (null == provider) {
             throw new NullPointerException("Provider unexpectedly null..");
         }
@@ -529,9 +519,7 @@ public class XMLCipher {
     public static XMLCipher getProviderInstance(
         String transformation, String provider, String canon
     ) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation, provider and c14n algorithm");
-        }
+        LOG.debug("Getting XMLCipher with transformation, provider and c14n algorithm");
         if (null == provider) {
             throw new NullPointerException("Provider unexpectedly null..");
         }
@@ -557,9 +545,7 @@ public class XMLCipher {
     public static XMLCipher getProviderInstance(
         String transformation, String provider, String canon, String digestMethod
     ) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with transformation, provider and c14n algorithm");
-        }
+        LOG.debug("Getting XMLCipher with transformation, provider and c14n algorithm");
         if (null == provider) {
             throw new NullPointerException("Provider unexpectedly null..");
         }
@@ -577,9 +563,7 @@ public class XMLCipher {
      * @throws XMLEncryptionException
      */
     public static XMLCipher getInstance() throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with no arguments");
-        }
+        LOG.debug("Getting XMLCipher with no arguments");
         return new XMLCipher(null, null, null, null);
     }
 
@@ -597,9 +581,7 @@ public class XMLCipher {
      * @throws XMLEncryptionException
      */
     public static XMLCipher getProviderInstance(String provider) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Getting XMLCipher with provider");
-        }
+        LOG.debug("Getting XMLCipher with provider");
         return new XMLCipher(null, provider, null, null);
     }
 
@@ -625,9 +607,7 @@ public class XMLCipher {
      */
     public void init(int opmode, Key key) throws XMLEncryptionException {
         // sanity checks
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Initializing XMLCipher...");
-        }
+        LOG.debug("Initializing XMLCipher...");
 
         ek = null;
         ed = null;
@@ -635,26 +615,18 @@ public class XMLCipher {
         switch (opmode) {
 
         case ENCRYPT_MODE :
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("opmode = ENCRYPT_MODE");
-            }
+            LOG.debug("opmode = ENCRYPT_MODE");
             ed = createEncryptedData(CipherData.VALUE_TYPE, "NO VALUE YET");
             break;
         case DECRYPT_MODE :
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("opmode = DECRYPT_MODE");
-            }
+            LOG.debug("opmode = DECRYPT_MODE");
             break;
         case WRAP_MODE :
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("opmode = WRAP_MODE");
-            }
+            LOG.debug("opmode = WRAP_MODE");
             ek = createEncryptedKey(CipherData.VALUE_TYPE, "NO VALUE YET");
             break;
         case UNWRAP_MODE :
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("opmode = UNWRAP_MODE");
-            }
+            LOG.debug("opmode = UNWRAP_MODE");
             break;
         default :
             LOG.error("Mode unexpectedly invalid");
@@ -697,9 +669,7 @@ public class XMLCipher {
      */
     public EncryptedData getEncryptedData() {
         // Sanity checks
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Returning EncryptedData");
-        }
+        LOG.debug("Returning EncryptedData");
         return ed;
     }
 
@@ -714,9 +684,7 @@ public class XMLCipher {
      */
     public EncryptedKey getEncryptedKey() {
         // Sanity checks
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Returning EncryptedKey");
-        }
+        LOG.debug("Returning EncryptedKey");
         return ek;
     }
 
@@ -848,9 +816,7 @@ public class XMLCipher {
      *  @throws Exception
      */
     private Document encryptElement(Element element) throws Exception{
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypting element...");
-        }
+        LOG.debug("Encrypting element...");
         if (null == element) {
             throw new XMLEncryptionException("empty", "Element unexpectedly null...");
         }
@@ -886,9 +852,7 @@ public class XMLCipher {
      * @throws Exception
      */
     private Document encryptElementContent(Element element) throws /* XMLEncryption */Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypting element content...");
-        }
+        LOG.debug("Encrypting element content...");
         if (null == element) {
             throw new XMLEncryptionException("empty", "Element unexpectedly null...");
         }
@@ -919,9 +883,7 @@ public class XMLCipher {
      * @throws Exception to indicate any exceptional conditions.
      */
     public Document doFinal(Document context, Document source) throws /* XMLEncryption */Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Processing source document...");
-        }
+        LOG.debug("Processing source document...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -960,9 +922,7 @@ public class XMLCipher {
      * @throws Exception to indicate any exceptional conditions.
      */
     public Document doFinal(Document context, Element element) throws /* XMLEncryption */Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Processing source element...");
-        }
+        LOG.debug("Processing source element...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1005,9 +965,7 @@ public class XMLCipher {
      */
     public Document doFinal(Document context, Element element, boolean content)
         throws /* XMLEncryption*/ Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Processing source element...");
-        }
+        LOG.debug("Processing source element...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1079,9 +1037,7 @@ public class XMLCipher {
     public EncryptedData encryptData(
         Document context, String type, InputStream serializedData
     ) throws Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypting element...");
-        }
+        LOG.debug("Encrypting element...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1112,9 +1068,7 @@ public class XMLCipher {
     public EncryptedData encryptData(
         Document context, Element element, boolean contentMode
     ) throws /* XMLEncryption */ Exception {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypting element...");
-        }
+        LOG.debug("Encrypting element...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1228,10 +1182,8 @@ public class XMLCipher {
         System.arraycopy(encryptedBytes, 0, finalEncryptedBytes, iv.length, encryptedBytes.length);
         String base64EncodedEncryptedOctets = Base64.getMimeEncoder().encodeToString(finalEncryptedBytes);
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypted octets:\n" + base64EncodedEncryptedOctets);
-            LOG.debug("Encrypted octets length = " + base64EncodedEncryptedOctets.length());
-        }
+        LOG.debug("Encrypted octets:\n{}", base64EncodedEncryptedOctets);
+        LOG.debug("Encrypted octets length = {}", base64EncodedEncryptedOctets.length());
 
         try {
             CipherData cd = ed.getCipherData();
@@ -1276,9 +1228,7 @@ public class XMLCipher {
      */
     public EncryptedData loadEncryptedData(Document context, Element element)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Loading encrypted element...");
-        }
+        LOG.debug("Loading encrypted element...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1307,9 +1257,7 @@ public class XMLCipher {
      */
     public EncryptedKey loadEncryptedKey(Document context, Element element)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Loading encrypted key...");
-        }
+        LOG.debug("Loading encrypted key...");
         if (null == context) {
             throw new XMLEncryptionException("empty", "Context document unexpectedly null...");
         }
@@ -1372,9 +1320,7 @@ public class XMLCipher {
         String mgfAlgorithm,
         byte[] oaepParams
     ) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypting key ...");
-        }
+        LOG.debug("Encrypting key ...");
 
         if (null == key) {
             throw new XMLEncryptionException("empty", "Key unexpectedly null...");
@@ -1421,10 +1367,8 @@ public class XMLCipher {
         }
 
         String base64EncodedEncryptedOctets = Base64.getMimeEncoder().encodeToString(encryptedBytes);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypted key octets:\n" + base64EncodedEncryptedOctets);
-            LOG.debug("Encrypted key octets length = " + base64EncodedEncryptedOctets.length());
-        }
+        LOG.debug("Encrypted key octets:\n{}", base64EncodedEncryptedOctets);
+        LOG.debug("Encrypted key octets length = {}", base64EncodedEncryptedOctets.length());
 
         CipherValue cv = ek.getCipherData().getCipherValue();
         cv.setValue(base64EncodedEncryptedOctets);
@@ -1452,9 +1396,7 @@ public class XMLCipher {
      */
     public Key decryptKey(EncryptedKey encryptedKey, String algorithm)
         throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Decrypting key from previously loaded EncryptedKey...");
-        }
+        LOG.debug("Decrypting key from previously loaded EncryptedKey...");
 
         if (cipherMode != UNWRAP_MODE) {
             throw new XMLEncryptionException("empty", "XMLCipher unexpectedly not in UNWRAP_MODE...");
@@ -1465,9 +1407,7 @@ public class XMLCipher {
         }
 
         if (key == null) {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Trying to find a KEK via key resolvers");
-            }
+            LOG.debug("Trying to find a KEK via key resolvers");
 
             KeyInfo ki = encryptedKey.getKeyInfo();
             if (ki != null) {
@@ -1482,9 +1422,7 @@ public class XMLCipher {
                     }
                 }
                 catch (Exception e) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(e.getMessage(), e);
-                    }
+                    LOG.debug(e.getMessage(), e);
                 }
             }
             if (key == null) {
@@ -1499,9 +1437,7 @@ public class XMLCipher {
         byte[] encryptedBytes = cipherInput.getBytes();
 
         String jceKeyAlgorithm = JCEMapper.getJCEKeyAlgorithmFromURI(algorithm);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("JCE Key Algorithm: " + jceKeyAlgorithm);
-        }
+        LOG.debug("JCE Key Algorithm: {}", jceKeyAlgorithm);
 
         Cipher c;
         if (contextCipher == null) {
@@ -1537,9 +1473,7 @@ public class XMLCipher {
         } catch (InvalidAlgorithmParameterException e) {
             throw new XMLEncryptionException(e);
         }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Decryption of key type " + algorithm + " OK");
-        }
+        LOG.debug("Decryption of key type {} OK", algorithm);
 
         return ret;
     }
@@ -1587,9 +1521,7 @@ public class XMLCipher {
      */
     private Cipher constructCipher(String algorithm, String digestAlgorithm) throws XMLEncryptionException {
         String jceAlgorithm = JCEMapper.translateURItoJCEID(algorithm);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("JCE Algorithm = " + jceAlgorithm);
-        }
+        LOG.debug("JCE Algorithm = {}", jceAlgorithm);
 
         Cipher c;
         try {
@@ -1696,9 +1628,7 @@ public class XMLCipher {
      * @throws XMLEncryptionException
      */
     private Document decryptElement(Element element) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Decrypting element...");
-        }
+        LOG.debug("Decrypting element...");
         if (serializer instanceof AbstractSerializer) {
             ((AbstractSerializer)serializer).setSecureValidation(secureValidation);
         }
@@ -1768,9 +1698,7 @@ public class XMLCipher {
      * @throws XMLEncryptionException
      */
     public byte[] decryptToByteArray(Element element) throws XMLEncryptionException {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Decrypting to ByteArray...");
-        }
+        LOG.debug("Decrypting to ByteArray...");
 
         if (cipherMode != DECRYPT_MODE) {
             throw new XMLEncryptionException("empty", "XMLCipher unexpectedly not in DECRYPT_MODE...");
@@ -1795,9 +1723,7 @@ public class XMLCipher {
                     ki.setSecureValidation(secureValidation);
                     key = ki.getSecretKey();
                 } catch (KeyResolverException kre) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug(kre.getMessage(), kre);
-                    }
+                    LOG.debug(kre.getMessage(), kre);
                 }
             }
 
@@ -1817,9 +1743,7 @@ public class XMLCipher {
         // Now create the working cipher
         String jceAlgorithm =
             JCEMapper.translateURItoJCEID(encMethodAlgorithm);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("JCE Algorithm = " + jceAlgorithm);
-        }
+        LOG.debug("JCE Algorithm = {}", jceAlgorithm);
 
         Cipher c;
         try {
@@ -2248,9 +2172,7 @@ public class XMLCipher {
             Element transformsElement = (Element) transformsElements.item(0);
 
             if (transformsElement != null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Creating a DSIG based Transforms element");
-                }
+                LOG.debug("Creating a DSIG based Transforms element");
                 try {
                     result.setTransforms(new TransformsImpl(transformsElement));
                 } catch (XMLSignatureException xse) {
@@ -3669,9 +3591,7 @@ public class XMLCipher {
                 result = "http://www.w3.org/2000/xmlns/".equals(
                     domResult.getNode().getFirstChild().getFirstChild().getAttributes().item(1).getNamespaceURI());
             }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Have functional IdentityTransformer: " + result);
-            }
+            LOG.debug("Have functional IdentityTransformer: {}", result);
             return result;
 
         } catch (Exception e) {

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipherInput.java Thu Mar  2 09:45:46 2017
@@ -114,9 +114,7 @@ public class XMLCipherInput {
 
         if (cipherData.getDataType() == CipherData.REFERENCE_TYPE) {
             // Fun time!
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Found a reference type CipherData");
-            }
+            LOG.debug("Found a reference type CipherData");
             CipherReference cr = cipherData.getCipherReference();
 
             // Need to wrap the uri in an Attribute node so that we can
@@ -134,21 +132,15 @@ public class XMLCipherInput {
             }
 
             if (input != null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Managed to resolve URI \"" + cr.getURI() + "\"");
-                }
+                LOG.debug("Managed to resolve URI \"{}\"", cr.getURI());
             } else {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Failed to resolve URI \"" + cr.getURI() + "\"");
-                }
+                LOG.debug("Failed to resolve URI \"{}\"", cr.getURI());
             }
 
             // Lets see if there are any transforms
             Transforms transforms = cr.getTransforms();
             if (transforms != null) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("Have transforms in cipher reference");
-                }
+                LOG.debug("Have transforms in cipher reference");
                 try {
                     org.apache.xml.security.transforms.Transforms dsTransforms =
                         transforms.getDSTransforms();
@@ -174,9 +166,7 @@ public class XMLCipherInput {
             throw new XMLEncryptionException("CipherData.getDataType() returned unexpected value");
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Encrypted octets:\n" + base64EncodedEncryptedOctets);
-        }
+        LOG.debug("Encrypted octets:\n{}", base64EncodedEncryptedOctets);
 
         return Base64.getMimeDecoder().decode(base64EncodedEncryptedOctets);
     }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Manifest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Manifest.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Manifest.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Manifest.java Thu Mar  2 09:45:46 2017
@@ -307,11 +307,9 @@ public class Manifest extends SignatureE
                     getFirstChild(), Constants._TAG_REFERENCE
                 );
         }
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("verify " + referencesEl.length + " References");
-            LOG.debug("I am " + (followManifests
-                ? "" : "not") + " requested to follow nested Manifests");
-        }
+        LOG.debug("verify {} References", referencesEl.length);
+        LOG.debug("I am {} requested to follow nested Manifests", (followManifests
+            ? "" : "not"));
         if (referencesEl.length == 0) {
             throw new XMLSecurityException("empty", new Object[]{"References are empty"});
         }
@@ -338,15 +336,11 @@ public class Manifest extends SignatureE
                 if (!currentRefVerified) {
                     verify = false;
                 }
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("The Reference has Type " + currentRef.getType());
-                }
+                LOG.debug("The Reference has Type {}", currentRef.getType());
 
                 // was verification successful till now and do we want to verify the Manifest?
                 if (verify && followManifests && currentRef.typeIsReferenceToManifest()) {
-                    if (LOG.isDebugEnabled()) {
-                        LOG.debug("We have to follow a nested Manifest");
-                    }
+                    LOG.debug("We have to follow a nested Manifest");
 
                     try {
                         XMLSignatureInput signedManifestNodes =
@@ -369,9 +363,7 @@ public class Manifest extends SignatureE
                                         );
                                     break;
                                 } catch (XMLSecurityException ex) {
-                                    if (LOG.isDebugEnabled()) {
-                                        LOG.debug(ex.getMessage(), ex);
-                                    }
+                                    LOG.debug(ex.getMessage(), ex);
                                     // Hm, seems not to be a ds:Manifest
                                 }
                             }
@@ -395,9 +387,7 @@ public class Manifest extends SignatureE
 
                             LOG.warn("The nested Manifest was invalid (bad)");
                         } else {
-                            if (LOG.isDebugEnabled()) {
-                                LOG.debug("The nested Manifest was valid (good)");
-                            }
+                            LOG.debug("The nested Manifest was valid (good)");
                         }
                     } catch (IOException ex) {
                         throw new ReferenceNotInitializedException(ex);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/Reference.java Thu Mar  2 09:45:46 2017
@@ -804,9 +804,7 @@ public class Reference extends Signature
             LOG.warn("Expected Digest: " + Base64.getMimeEncoder().encodeToString(elemDig));
             LOG.warn("Actual Digest: " + Base64.getMimeEncoder().encodeToString(calcDig));
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Verification successful for URI \"" + this.getURI() + "\"");
-            }
+            LOG.debug("Verification successful for URI \"{}\"", this.getURI());
         }
 
         return equal;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/signature/XMLSignature.java Thu Mar  2 09:45:46 2017
@@ -712,12 +712,11 @@ public final class XMLSignature extends
             //create a SignatureAlgorithms from the SignatureMethod inside
             //SignedInfo. This is used to validate the signature.
             SignatureAlgorithm sa = si.getSignatureAlgorithm();
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("signatureMethodURI = " + sa.getAlgorithmURI());
-                LOG.debug("jceSigAlgorithm = " + sa.getJCEAlgorithmString());
-                LOG.debug("jceSigProvider = " + sa.getJCEProviderName());
-                LOG.debug("PublicKey = " + pk);
-            }
+            LOG.debug("signatureMethodURI = {}", sa.getAlgorithmURI());
+            LOG.debug("jceSigAlgorithm = {}", sa.getJCEAlgorithmString());
+            LOG.debug("jceSigProvider = {}", sa.getJCEProviderName());
+            LOG.debug("PublicKey = {}", pk);
+
             byte sigBytes[] = null;
             try (SignerOutputStream so = new SignerOutputStream(sa);
                 OutputStream bos = new UnsyncBufferedOutputStream(so)) {
@@ -730,9 +729,7 @@ public final class XMLSignature extends
                 // retrieve the byte[] from the stored signature
                 sigBytes = this.getSignatureValue();
             } catch (IOException ex) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug(ex.getMessage(), ex);
-                }
+                LOG.debug(ex.getMessage(), ex);
                 // Impossible...
             } catch (XMLSecurityException ex) {
                 throw ex;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java Thu Mar  2 09:45:46 2017
@@ -37,7 +37,6 @@ import java.util.List;
 public class InputProcessorChainImpl implements InputProcessorChain {
 
     protected static final transient Logger LOG = LoggerFactory.getLogger(InputProcessorChainImpl.class);
-    protected static final transient boolean isDebugEnabled = LOG.isDebugEnabled();
 
     private List<InputProcessor> inputProcessors;
     private int startPos;
@@ -158,20 +157,18 @@ public class InputProcessorChainImpl imp
                 inputProcessors.add(idxToInsert, newInputProcessor);
             }
         }
-        if (isDebugEnabled) {
-            LOG.debug("Added " + newInputProcessor.getClass().getName() + " to input chain: ");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Added {} to input chain: ", newInputProcessor.getClass().getName());
             for (int i = 0; i < inputProcessors.size(); i++) {
                 InputProcessor inputProcessor = inputProcessors.get(i);
-                LOG.debug("Name: " + inputProcessor.getClass().getName() + " phase: " + inputProcessor.getPhase());
+                LOG.debug("Name: {} phase: {}", inputProcessor.getClass().getName(), inputProcessor.getPhase());
             }
         }
     }
 
     @Override
     public synchronized void removeProcessor(InputProcessor inputProcessor) {
-        if (isDebugEnabled) {
-            LOG.debug("Removing processor " + inputProcessor.getClass().getName() + " from input chain");
-        }
+        LOG.debug("Removing processor {} from input chain", inputProcessor.getClass().getName());
         if (this.inputProcessors.indexOf(inputProcessor) <= curPos) {
             this.curPos--;
         }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java Thu Mar  2 09:45:46 2017
@@ -39,7 +39,6 @@ import java.util.List;
 public class OutputProcessorChainImpl implements OutputProcessorChain {
 
     protected static final transient Logger LOG = LoggerFactory.getLogger(OutputProcessorChainImpl.class);
-    protected static final transient boolean isDebugEnabled = LOG.isDebugEnabled();
 
     private List<OutputProcessor> outputProcessors;
     private int startPos;
@@ -164,20 +163,18 @@ public class OutputProcessorChainImpl im
         if (idxToInsert < this.curPos) {
             this.curPos++;
         }
-        if (isDebugEnabled) {
-            LOG.debug("Added " + newOutputProcessor.getClass().getName() + " to output chain: ");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Added {} to output chain: ", newOutputProcessor.getClass().getName());
             for (int i = 0; i < outputProcessors.size(); i++) {
                 OutputProcessor outputProcessor = outputProcessors.get(i);
-                LOG.debug("Name: " + outputProcessor.getClass().getName() + " phase: " + outputProcessor.getPhase());
+                LOG.debug("Name: {} phase: {}", outputProcessor.getClass().getName(), outputProcessor.getPhase());
             }
         }
     }
 
     @Override
     public void removeProcessor(OutputProcessor outputProcessor) {
-        if (isDebugEnabled) {
-            LOG.debug("Removing processor " + outputProcessor.getClass().getName() + " from output chain");
-        }
+        LOG.debug("Removing processor {} from output chain", outputProcessor.getClass().getName());
         if (this.outputProcessors.indexOf(outputProcessor) <= this.curPos) {
             this.curPos--;
         }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java Thu Mar  2 09:45:46 2017
@@ -386,8 +386,8 @@ public abstract class AbstractSignatureR
 
     protected void compareDigest(byte[] calculatedDigest, ReferenceType referenceType) throws XMLSecurityException {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Calculated Digest: " + new String(Base64.encodeBase64(calculatedDigest)));
-            LOG.debug("Stored Digest: " + new String(Base64.encodeBase64(referenceType.getDigestValue())));
+            LOG.debug("Calculated Digest: {}", new String(Base64.encodeBase64(calculatedDigest)));
+            LOG.debug("Stored Digest: {}", new String(Base64.encodeBase64(referenceType.getDigestValue())));
         }
 
         if (!MessageDigest.isEqual(referenceType.getDigestValue(), calculatedDigest)) {

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureOutputProcessor.java Thu Mar  2 09:45:46 2017
@@ -128,9 +128,7 @@ public abstract class AbstractSignatureO
         }
 
         String calculatedDigest = new String(Base64.encodeBase64(digestOutputStream.getDigestValue()));
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Calculated Digest: " + calculatedDigest);
-        }
+        LOG.debug("Calculated Digest: {}", calculatedDigest);
 
         signaturePartDef.setDigestValue(calculatedDigest);
 
@@ -294,9 +292,7 @@ public abstract class AbstractSignatureO
                             throw new XMLSecurityException(e);
                         }
                         String calculatedDigest = new String(Base64.encodeBase64(this.digestOutputStream.getDigestValue()));
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("Calculated Digest: " + calculatedDigest);
-                        }
+                        LOG.debug("Calculated Digest: {}", calculatedDigest);
                         signaturePartDef.setDigestValue(calculatedDigest);
 
                         outputProcessorChain.removeProcessor(this);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transform.java Thu Mar  2 09:45:46 2017
@@ -356,11 +356,8 @@ public final class Transform extends Sig
             );
         }
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Create URI \"" + algorithmURI + "\" class \""
-                      + newTransformSpi.getClass() + "\"");
-            LOG.debug("The NodeList is " + contextNodes);
-        }
+        LOG.debug("Create URI \"{}\" class \"{}\"", algorithmURI, newTransformSpi.getClass());
+        LOG.debug("The NodeList is {}", contextNodes);
 
         // give it to the current document
         if (contextNodes != null) {

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java?rev=1785092&r1=1785091&r2=1785092&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/transforms/Transforms.java Thu Mar  2 09:45:46 2017
@@ -161,9 +161,7 @@ public class Transforms extends Signatur
      */
     public void addTransform(String transformURI) throws TransformationException {
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Transforms.addTransform(" + transformURI + ")");
-            }
+            LOG.debug("Transforms.addTransform({})", transformURI);
 
             Transform transform = new Transform(getDocument(), transformURI);
 
@@ -185,9 +183,7 @@ public class Transforms extends Signatur
     public void addTransform(String transformURI, Element contextElement)
        throws TransformationException {
         try {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Transforms.addTransform(" + transformURI + ")");
-            }
+            LOG.debug("Transforms.addTransform({})", transformURI);
 
             Transform transform = new Transform(getDocument(), transformURI, contextElement);
 
@@ -223,9 +219,7 @@ public class Transforms extends Signatur
      * @param transform {@link Transform} object
      */
     private void addTransform(Transform transform) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Transforms.addTransform(" + transform.getURI() + ")");
-        }
+        LOG.debug("Transforms.addTransform({})", transform.getURI());
 
         Element transformElement = transform.getElement();
 
@@ -263,19 +257,13 @@ public class Transforms extends Signatur
             int last = this.getLength() - 1;
             for (int i = 0; i < last; i++) {
                 Transform t = this.item(i);
-                if (LOG.isDebugEnabled()) {
-                    String uri = t.getURI();
-                    LOG.debug("Perform the (" + i + ")th " + uri + " transform");
-                }
+                LOG.debug("Perform the ({})th {} transform", i, t.getURI());
                 checkSecureValidation(t);
                 xmlSignatureInput = t.performTransform(xmlSignatureInput);
             }
             if (last >= 0) {
                 Transform t = this.item(last);
-                if (LOG.isDebugEnabled()) {
-                    String uri = t.getURI();
-                    LOG.debug("Perform the (" + last + ")th " + uri + " transform");
-                }
+                LOG.debug("Perform the ({})th {} transform", last, t.getURI());
                 checkSecureValidation(t);
                 xmlSignatureInput = t.performTransform(xmlSignatureInput, os);
             }