8031191: Warning exception when XMLSignature logging is enabled
Reviewed-by: mullan, chegar
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/XMLSignature.java Wed Oct 01 23:10:34 2014 +0400
+++ b/jdk/src/java.xml.crypto/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);