RFR: 8021591 : (s) Additional explicit null checks

Martin Buchholz martinrb at google.com
Thu Aug 1 16:34:42 UTC 2013


Overall, I hate these kinds of changes to be super-pedantically correct, at
the cost of a small performance loss and a small compatibility hit.  I
resisted doing them when I was maintaining these classes.  So there's an
edge case where an NPE isn't thrown - who cares?  Are there users asking
for this?


On Fri, Jul 26, 2013 at 4:31 PM, Mike Duigou <mike.duigou at oracle.com> wrote:

> Hello all;
>
> This patch adds some missing checks for null that, according to interface
> contract, should be throwing NPE. It also improves the existing tests to
> check for these cases.
>
> http://cr.openjdk.java.net/~mduigou/JDK-8021591/0/webrev/
>
> The changes to
> src/share/classes/java/util/concurrent/ConcurrentHashMap.java will be
> synchronized separately with the jsr166 workspace. They are part of this
> review to avoid test failures.
>
> Mike



More information about the core-libs-dev mailing list