Re: RFR: 8289484: Cleanup unnecessary null comparison before instanceof check in java.rmi

2022-07-03 Thread Attila Szegedi
On Wed, 29 Jun 2022 21:11:09 GMT, Andrey Turbanov wrote: > Update code checks both non-null and instance of a class in jdk.hotspot.agent > module classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > > For example, the following

Re: RFR: 8289484: Cleanup unnecessary null comparison before instanceof check in java.rmi

2022-06-29 Thread Jaikiran Pai
On Wed, 29 Jun 2022 21:11:09 GMT, Andrey Turbanov wrote: > Update code checks both non-null and instance of a class in jdk.hotspot.agent > module classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > > For example, the following

RFR: 8289484: Cleanup unnecessary null comparison before instanceof check in java.rmi

2022-06-29 Thread Andrey Turbanov
Update code checks both non-null and instance of a class in jdk.hotspot.agent module classes. The checks and explicit casts could also be replaced with pattern matching for the instanceof operator. For example, the following code: if ((obj != null) && (obj instanceof TCPEndpoint)) {