Update code checks both non-null and instance of a class in jdk.jdi module classes. The checks and explicit casts could also be replaced with pattern matching for the instanceof operator. Similar cleanups 1. [JDK-8273484](https://bugs.openjdk.java.net/browse/JDK-8273484) java.naming 2. [JDK-8258422](https://bugs.openjdk.java.net/browse/JDK-8258422) java.base
------------- Commit messages: - 8274232: Cleanup unnecessary null comparison before instanceof check in jdk.jdi Changes: https://git.openjdk.java.net/jdk/pull/5659/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5659&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274232 Stats: 65 lines in 20 files changed: 0 ins; 13 del; 52 mod Patch: https://git.openjdk.java.net/jdk/pull/5659.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5659/head:pull/5659 PR: https://git.openjdk.java.net/jdk/pull/5659