RFR 8054536: sun.security.x509.Extension object may throw NPE for hashCode and equals method
Artem Smotrakov
artem.smotrakov at oracle.com
Thu Jul 14 16:35:19 UTC 2016
Hi Svetlana,
I'll leave the main review to an official reviewer, but I have a couple
of comments.
There are a couple of other places in Extension.java where NPE may occur:
- line 255: I see that "extensionId" is checked for null in other
methods, but not in getId()
- line 200: I see that "extensionValue" is checked for null in other
methids, but not in getValue()
Minor: try-catch is not really necessary.
I am not sure, but "iff" might mean "if and only if", so it may be not a
typo.
You may want to add @Override to a couple of methods since you update
Extension.java
Artem
On 07/14/2016 08:19 AM, Svetlana Nikandrova wrote:
> Hello,
>
> please review the fix for:
> https://bugs.openjdk.java.net/browse/JDK-8054536
> Webrev:
> http://cr.openjdk.java.net/~snikandrova/8054536/webrev.00/
> <http://cr.openjdk.java.net/%7Esnikandrova/8054536/webrev.00/>
>
> Description:
> Equals and hasCode methods of Extension use extensionId without prior
> check for "null" (+ 1 mistype in equals javadoc).
>
> Thank you,
> Svetlana
More information about the security-dev
mailing list