On Tue, 28 Jun 2022 07:07:24 GMT, rmartinc <d...@openjdk.org> wrote:

>> src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java
>>  line 339:
>> 
>>> 337:                         break;
>>> 338:                     } else if (errEx == null) {
>>> 339:                         errEx = re.getNamingException();
>> 
>> Could we set up a local variable here to avoid calling 
>> re.getNamingException() more than once?
>> e.g. something like:
>> 
>> 
>> var cause = re.getNamingException();
>> if (cause instanceof ...) {
>> 
>> 
>> then use `cause` throughout.
>
> Yes, of course, I just called the var `namingException` instead of `cause`. 
> It's done now.

Sorry! I have squashed the two commits... I didn't know the system will do it 
before merging. 😞

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

PR: https://git.openjdk.org/jdk/pull/9256

Reply via email to