javax/naming/NamingEnumeration.java
public interface NamingEnumeration<T> extends Enumeration<T> {
public boolean hasMore() throws NamingException;
public T next() throws NamingException;
...
}
java/util/Enumeration.java
public interface Enumeration<E> {
boolean hasMoreElements();
E nextElement();
}
e.hasMoreElements() e.hasMore() .
false ( , ), .
, , , NamingException ( CommunicationException).
DirContext.search ,
NamingEnumeration.hasMore() false , .
?
JDK http://download.java.net/openjdk/jdk6/ → openjdk-6-src-b24-14_nov_2011.tar.gz
JDK,
. JDK1.6 ( com.sun.jndi. *)
JDK "false" , .
./jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java
protected void processReturnCode(LdapResult res, Name resolvedName, Object resolvedObj, Name remainName, Hashtable envprops, String fullDN) throws NamingException {
NamingException e;
switch (res.status) {
case LdapClient.LDAP_SUCCESS:
if (res.referrals != null) {
msg = "Unprocessed Continuation Reference(s)";
if (handleReferrals == LdapClient.LDAP_REF_IGNORE) {
e = new PartialResultException(msg);
break;
}
[...]
}
[...]
throw e;
}
.
, , DirContext.search ,
NamingEnumeration.hasMore() false .
?