changeset 13814:02a480beae45

8031191: Warning exception when XMLSignature logging is enabled Reviewed-by: mullan, chegar Contributed-by: ebaron@redhat.com
author coffeys
date Thu, 02 Oct 2014 17:34:44 +0100
parents 6f7954907722
children c34bf278efae
files src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Tue Oct 08 15:30:46 2019 +0200
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java	Thu Oct 02 17:34:44 2014 +0100
@@ -699,15 +699,15 @@
             //create a SignatureAlgorithms from the SignatureMethod inside
             //SignedInfo. This is used to validate the signature.
             SignatureAlgorithm sa = si.getSignatureAlgorithm();
-            if (log.isLoggable(java.util.logging.Level.FINE)) {
-                log.log(java.util.logging.Level.FINE, "signatureMethodURI = " + sa.getAlgorithmURI());
-                log.log(java.util.logging.Level.FINE, "jceSigAlgorithm    = " + sa.getJCEAlgorithmString());
-                log.log(java.util.logging.Level.FINE, "jceSigProvider     = " + sa.getJCEProviderName());
-                log.log(java.util.logging.Level.FINE, "PublicKey = " + pk);
-            }
             byte sigBytes[] = null;
             try {
                 sa.initVerify(pk);
+                if (log.isLoggable(java.util.logging.Level.FINE)) {
+                    log.log(java.util.logging.Level.FINE, "signatureMethodURI = " + sa.getAlgorithmURI());
+                    log.log(java.util.logging.Level.FINE, "jceSigAlgorithm    = " + sa.getJCEAlgorithmString());
+                    log.log(java.util.logging.Level.FINE, "jceSigProvider     = " + sa.getJCEProviderName());
+                    log.log(java.util.logging.Level.FINE, "PublicKey = " + pk);
+                }
 
                 // Get the canonicalized (normalized) SignedInfo
                 SignerOutputStream so = new SignerOutputStream(sa);