RFR: (XS) : 8131665: Bad exception message in HandshakeHash.getFinishedHash

Seán Coffey sean.coffey at oracle.com
Thu Jul 16 17:02:56 UTC 2015


Bug report : https://bugs.openjdk.java.net/browse/JDK-8131665

Simple fix to improve the Error message for this scenario.

diff --git 
a/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java 
b/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
--- a/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
+++ b/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java
@@ -355,7 +355,7 @@
          try {
              return cloneDigest(finMD).digest();
          } catch (Exception e) {
-            throw new Error("BAD");
+            throw new Error("Error during hash calculation", e);
          }
      }
  }

-- 
Regards,
Sean.



More information about the security-dev mailing list