changeset 51508:f99640a44d75

8209851: Algorithm name is compared via reference identity Reviewed-by: mullan
author igerasim
date Thu, 23 Aug 2018 09:36:13 -0700
parents 3e3764f8fe36
children 758b3f3f3a8d
files src/java.base/share/classes/sun/security/provider/DSA.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/provider/DSA.java	Thu Aug 23 09:35:09 2018 -0700
+++ b/src/java.base/share/classes/sun/security/provider/DSA.java	Thu Aug 23 09:36:13 2018 -0700
@@ -152,7 +152,7 @@
 
         // check key size against hash output size for signing
         // skip this check for verification to minimize impact on existing apps
-        if (md.getAlgorithm() != "NullDigest20") {
+        if (!"NullDigest20".equals(md.getAlgorithm())) {
             checkKey(params, md.getDigestLength()*8, md.getAlgorithm());
         }