src/java.base/share/classes/sun/security/x509/AlgorithmId.java
changeset 57895 82a71d82e326
parent 53351 bdb29aa5fd31
child 57950 4612a3cfb927
equal deleted inserted replaced
57894:01b9c26e2651 57895:82a71d82e326
   272     /**
   272     /**
   273      * Returns true iff the argument indicates the same algorithm
   273      * Returns true iff the argument indicates the same algorithm
   274      * with the same parameters.
   274      * with the same parameters.
   275      */
   275      */
   276     public boolean equals(AlgorithmId other) {
   276     public boolean equals(AlgorithmId other) {
   277         boolean paramsEqual =
   277         boolean paramsEqual = Objects.equals(other.params, params);
   278           (params == null ? other.params == null : params.equals(other.params));
       
   279         return (algid.equals((Object)other.algid) && paramsEqual);
   278         return (algid.equals((Object)other.algid) && paramsEqual);
   280     }
   279     }
   281 
   280 
   282     /**
   281     /**
   283      * Compares this AlgorithmID to another.  If algorithm parameters are
   282      * Compares this AlgorithmID to another.  If algorithm parameters are