8141148: LDAP "follow" throws ClassCastException with Java 8
Reviewed-by: prappo, xuelei
This commit is contained in:
parent
e4a671e635
commit
c748cd54ac
@ -300,7 +300,7 @@ abstract class AbstractLdapNamingEnumeration<T extends NameClassPair>
|
||||
errEx = e;
|
||||
}
|
||||
|
||||
protected abstract AbstractLdapNamingEnumeration<T> getReferredResults(
|
||||
protected abstract AbstractLdapNamingEnumeration<? extends NameClassPair> getReferredResults(
|
||||
LdapReferralContext refCtx) throws NamingException;
|
||||
|
||||
/*
|
||||
@ -360,7 +360,7 @@ abstract class AbstractLdapNamingEnumeration<T extends NameClassPair>
|
||||
* Merge the entries and/or referrals from the supplied enumeration
|
||||
* with those of the current enumeration.
|
||||
*/
|
||||
protected void update(AbstractLdapNamingEnumeration<T> ne) {
|
||||
protected void update(AbstractLdapNamingEnumeration<? extends NameClassPair> ne) {
|
||||
// Cleanup previous context first
|
||||
homeCtx.decEnumCount();
|
||||
|
||||
|
@ -104,9 +104,9 @@ final class LdapBindingEnumeration
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LdapBindingEnumeration getReferredResults(
|
||||
protected AbstractLdapNamingEnumeration<? extends NameClassPair> getReferredResults(
|
||||
LdapReferralContext refCtx) throws NamingException{
|
||||
// repeat the original operation at the new context
|
||||
return (LdapBindingEnumeration)refCtx.listBindings(listArg);
|
||||
return (AbstractLdapNamingEnumeration<? extends NameClassPair>)refCtx.listBindings(listArg);
|
||||
}
|
||||
}
|
||||
|
@ -72,9 +72,9 @@ final class LdapNamingEnumeration
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LdapNamingEnumeration getReferredResults(
|
||||
protected AbstractLdapNamingEnumeration<? extends NameClassPair> getReferredResults(
|
||||
LdapReferralContext refCtx) throws NamingException {
|
||||
// repeat the original operation at the new context
|
||||
return (LdapNamingEnumeration)refCtx.list(listArg);
|
||||
return (AbstractLdapNamingEnumeration<? extends NameClassPair>)refCtx.list(listArg);
|
||||
}
|
||||
}
|
||||
|
@ -199,15 +199,15 @@ final class LdapSearchEnumeration
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LdapSearchEnumeration getReferredResults(
|
||||
protected AbstractLdapNamingEnumeration<? extends NameClassPair> getReferredResults(
|
||||
LdapReferralContext refCtx) throws NamingException {
|
||||
// repeat the original operation at the new context
|
||||
return (LdapSearchEnumeration)refCtx.search(
|
||||
return (AbstractLdapNamingEnumeration<? extends NameClassPair>)refCtx.search(
|
||||
searchArgs.name, searchArgs.filter, searchArgs.cons);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void update(AbstractLdapNamingEnumeration<SearchResult> ne) {
|
||||
protected void update(AbstractLdapNamingEnumeration<? extends NameClassPair> ne) {
|
||||
super.update(ne);
|
||||
|
||||
// Update search-specific variables
|
||||
|
Loading…
x
Reference in New Issue
Block a user