Hi,
I has prepared trivial patch for bug JDK-8176553, which I has reported.

I will welcome if it could be merged into JDK.
(The bug is present in JDK9 and JDK8 too.)
I am covered by Red Hat OCA.

The patch is attached, bug reproducer is already in JIRA:
https://bugs.openjdk.java.net/browse/JDK-8176553

Thanks,
Jan Kalina
diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java b/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java
@@ -312,7 +312,8 @@
 
         if ((refEx != null) &&
             (refEx.hasMoreReferrals() ||
-             refEx.hasMoreReferralExceptions())) {
+             refEx.hasMoreReferralExceptions()) &&
+             ! (errEx instanceof LimitExceededException)) {
 
             if (homeCtx.handleReferrals == LdapClient.LDAP_REF_THROW) {
                 throw (NamingException)(refEx.fillInStackTrace());

Reply via email to