[11] RFR: 8193128: Reduce number of implementation classes returned by List/Set/Map.of()

Claes Redestad claes.redestad at oracle.com
Mon Jan 8 15:00:51 UTC 2018


Hi Andrej, thanks for catching this. Webrev updated in-place.

Regards

/Claes

On 2018-01-08 14:25, Andrej Golovnin wrote:
> Hi Claes,
>
>> http://cr.openjdk.java.net/~redestad/8193128/open.05/
> src/java.base/share/classes/java/util/ImmutableCollections.java
>
>   599         public boolean contains(Object o) {
>   600             Objects.requireNonNull(o);
>   601             return size > 0 && probe(o) >= 0; // implicit nullcheck of o
>   602         }
>
> I think that the comment about the implicit null check in the line 601
> is not needed anymore.
>
> Best regards,
> Andrej Golovnin



More information about the core-libs-dev mailing list