Re: RFR: 8273484: Cleanup unnecessary null comparison before instanceof check in java.naming [v2]

2021-09-10 Thread Daniel Fuchs
On Thu, 9 Sep 2021 13:24:27 GMT, Andrey Turbanov wrote: >> Update code checks both non-null and instance of a class in java.naming >> module classes. >> The checks and explicit casts could also be replaced with pattern matching >> for the instanceof operator. >> For example: >> The

Re: RFR: 8273484: Cleanup unnecessary null comparison before instanceof check in java.naming [v2]

2021-09-09 Thread Aleksei Efimov
On Thu, 9 Sep 2021 13:24:27 GMT, Andrey Turbanov wrote: >> Update code checks both non-null and instance of a class in java.naming >> module classes. >> The checks and explicit casts could also be replaced with pattern matching >> for the instanceof operator. >> For example: >> The

Re: RFR: 8273484: Cleanup unnecessary null comparison before instanceof check in java.naming [v2]

2021-09-09 Thread Andrey Turbanov
> Update code checks both non-null and instance of a class in java.naming > module classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > For example: > The following code: > > return (obj != null && >