8209851: Algorithm name is compared via reference identity
authorigerasim
Thu, 23 Aug 2018 09:36:13 -0700
changeset 51508 f99640a44d75
parent 51507 3e3764f8fe36
child 51509 758b3f3f3a8d
8209851: Algorithm name is compared via reference identity Reviewed-by: mullan
src/java.base/share/classes/sun/security/provider/DSA.java
--- 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());
         }