RFR: 8263358: Update java.lang to use instanceof pattern variable [v5]

Pavel Rappo prappo at openjdk.java.net
Mon Mar 15 10:21:08 UTC 2021


On Mon, 15 Mar 2021 09:32:33 GMT, Rémi Forax <github.com+828220+forax at openjdk.org> wrote:

>> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8263358: Refactored missed equals method
>
> src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java line 360:
> 
>> 358:     public final boolean equals(Object o) {
>> 359:         if (this == o) return true;
>> 360:         return (o instanceof DynamicConstantDesc desc)
> 
> should be
>   `(o instanceof DynamicConstantDesc<?> desc)`

I noticed that too initially. However, `javac` does not seem to produce a "rawtypes" warning. Which makes sense, if you think about it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2913


More information about the core-libs-dev mailing list