8226831: Use Objects.equals() when appropriate

Reviewed-by: rriggs, bpb
This commit is contained in:
Ivan Gerasimov 2019-08-27 14:44:21 -07:00
parent 99bf89c581
commit 3ed845784d
7 changed files with 26 additions and 31 deletions

View file

@ -274,8 +274,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
* with the same parameters.
*/
public boolean equals(AlgorithmId other) {
boolean paramsEqual =
(params == null ? other.params == null : params.equals(other.params));
boolean paramsEqual = Objects.equals(other.params, params);
return (algid.equals((Object)other.algid) && paramsEqual);
}