RFR: 8276042: Remove unused local variables in java.naming

Aleksei Efimov aefimov at openjdk.java.net
Wed Oct 27 11:43:14 UTC 2021


On Sat, 23 Oct 2021 12:51:15 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:

> 8276042: Remove unused local variables in java.naming

Hi Andrey,

Thanks for cleaning up the code.
Changes look good to me, with one suggestion below.

src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/PartialCompositeContext.java line 514:

> 512:         Object obj = cont.getResolvedObj();
> 513: 
> 514:         if (obj instanceof PartialCompositeContext) {

Since we're changing this method, maybe `instanceof` pattern matching can be used here to remove casting below.

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

Marked as reviewed by aefimov (Committer).

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


More information about the core-libs-dev mailing list