src/share/classes/sun/security/x509/DistributionPoint.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -317,17 +317,10 @@
}
out.write(DerValue.tag_Sequence, tagged);
}
/**
- * Utility function for a.equals(b) where both a and b may be null.
- */
- private static boolean equals(Object a, Object b) {
- return (a == null) ? (b == null) : a.equals(b);
- }
-
- /**
* Compare an object to this DistributionPoint for equality.
*
* @param obj Object to be compared to this
* @return true if objects match; false otherwise
*/
@@ -338,13 +331,13 @@
if (obj instanceof DistributionPoint == false) {
return false;
}
DistributionPoint other = (DistributionPoint)obj;
- boolean equal = equals(this.fullName, other.fullName)
- && equals(this.relativeName, other.relativeName)
- && equals(this.crlIssuer, other.crlIssuer)
+ boolean equal = Objects.equals(this.fullName, other.fullName)
+ && Objects.equals(this.relativeName, other.relativeName)
+ && Objects.equals(this.crlIssuer, other.crlIssuer)
&& Arrays.equals(this.reasonFlags, other.reasonFlags);
return equal;
}
public int hashCode() {