8054158: Fix typos in JNDI-related packages
Reviewed-by: rriggs, vinnie
This commit is contained in:
parent
c4304d447a
commit
5731d09e61
jdk/src/share/classes
com/sun/jndi
cosnaming
dns
ldap
AbstractLdapNamingEnumeration.javaClientId.javaEventQueue.javaEventSupport.javaLdapAttribute.javaLdapCtx.javaLdapName.javaLdapReferralContext.javaLdapRequest.javaLdapSchemaParser.javaLdapSearchEnumeration.javaLdapURL.javaServiceLocator.java
pool
toolkit
ctx
dir
url
url/ldap
javax/naming
@ -1145,7 +1145,7 @@ public class CNCtx implements javax.naming.Context {
|
||||
|
||||
// Never destroy an orb in CNCtx.
|
||||
// The orb we have is either the shared/default orb, or one passed in to a constructor
|
||||
// from elsewhere, so that orb is somebody else's reponsibility.
|
||||
// from elsewhere, so that orb is somebody else's responsibility.
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
|
@ -376,7 +376,7 @@ public class DnsClient {
|
||||
|
||||
|
||||
/**
|
||||
* Tries to retreive an UDP packet matching the given xid
|
||||
* Tries to retrieve a UDP packet matching the given xid
|
||||
* received within the timeout.
|
||||
* If a packet with different xid is received, the received packet
|
||||
* is enqueued with the corresponding xid in 'resps'.
|
||||
|
@ -137,7 +137,7 @@ abstract class AbstractLdapNamingEnumeration<T extends NameClassPair>
|
||||
limit = (entries == null) ? 0 : entries.size(); // handle empty set
|
||||
posn = 0; // reset
|
||||
|
||||
// mimimize the number of calls to processReturnCode()
|
||||
// minimize the number of calls to processReturnCode()
|
||||
// (expensive when batchSize is small and there are many results)
|
||||
if ((res.status != LdapClient.LDAP_SUCCESS) ||
|
||||
((res.status == LdapClient.LDAP_SUCCESS) &&
|
||||
|
@ -196,7 +196,7 @@ class ClientId {
|
||||
System.out.println("ClientId received an exception");
|
||||
e.printStackTrace();
|
||||
}
|
||||
// Failed to invoke the comparator; flag unequality
|
||||
// Failed to invoke the comparator; flag inequality
|
||||
return false;
|
||||
}
|
||||
if (((Integer) ret) == 0) {
|
||||
|
@ -75,7 +75,7 @@ final class EventQueue implements Runnable {
|
||||
* Enqueue an event.
|
||||
* @param event Either a <tt>NamingExceptionEvent</tt> or a subclass
|
||||
* of <tt>NamingEvent</tt> or
|
||||
* <tt>UnsolicitedNotificatoniEvent</tt>.
|
||||
* <tt>UnsolicitedNotificationEvent</tt>.
|
||||
* If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement
|
||||
* the corresponding subinterface of <tt>NamingListener</tt>.
|
||||
* For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em>
|
||||
@ -141,7 +141,7 @@ final class EventQueue implements Runnable {
|
||||
// it is interested in. (No need to check mask or
|
||||
// instanceof subinterfaces.)
|
||||
// It is the responsibility of the enqueuer to
|
||||
// only enqueue events with listseners of the correct type.
|
||||
// only enqueue events with listeners of the correct type.
|
||||
|
||||
if (e instanceof NamingEvent) {
|
||||
((NamingEvent)e).dispatch(v.elementAt(i));
|
||||
|
@ -83,7 +83,7 @@ import javax.naming.ldap.UnsolicitedNotification;
|
||||
*a new notifier is created for the listener.
|
||||
*
|
||||
*<h4>Deregistration</h4>
|
||||
*When a deregistration request is made, this class attemps to find its
|
||||
*When a deregistration request is made, this class attempts to find its
|
||||
*corresponding notifier. If the notifier is found, the listener is removed
|
||||
*from the notifier's list. If the listener is the last listener on the list,
|
||||
*the notifier's thread is terminated and removed from this class's hashtable.
|
||||
|
@ -34,7 +34,7 @@ import javax.naming.directory.*;
|
||||
/**
|
||||
* This subclass is used by LDAP to implement the schema calls.
|
||||
* Basically, it keeps track of which context it is an attribute of
|
||||
* so it can get the schema for that cotnext.
|
||||
* so it can get the schema for that context.
|
||||
*
|
||||
* @author Jon Ruiz
|
||||
*/
|
||||
@ -134,7 +134,7 @@ final class LdapAttribute extends BasicAttribute {
|
||||
// setup internal state
|
||||
this.setBaseCtxInfo();
|
||||
|
||||
// let the ObjectOutpurStream do the real work of serialization
|
||||
// let the ObjectOutputStream do the real work of serialization
|
||||
out.defaultWriteObject();
|
||||
}
|
||||
|
||||
|
@ -1651,7 +1651,7 @@ final public class LdapCtx extends ComponentDirContext
|
||||
*
|
||||
* This function is called regardless of the server's version, since
|
||||
* an administrator may have setup the server to support client schema
|
||||
* queries. If this function trys a serarch on a v2 server that
|
||||
* queries. If this function tries a search on a v2 server that
|
||||
* doesn't support schema, one of these two things will happen:
|
||||
* 1) It will get an exception when querying the root DSE
|
||||
* 2) It will not find a subschemasubentry on the root DSE
|
||||
@ -2016,7 +2016,7 @@ final public class LdapCtx extends ComponentDirContext
|
||||
* - the returning attributes list is present but empty
|
||||
*/
|
||||
|
||||
// returns true if a search can be caried out as a compare, and sets
|
||||
// returns true if a search can be carried out as a compare, and sets
|
||||
// tokens[0] and tokens[1] to the type and value respectively.
|
||||
// e.g. filter "cn=Jon Ruiz" becomes, type "cn" and value "Jon Ruiz"
|
||||
// This function uses the documents JNDI Compare example as a model
|
||||
@ -2083,7 +2083,7 @@ final public class LdapCtx extends ComponentDirContext
|
||||
return false; // unbalanced
|
||||
}
|
||||
|
||||
// make sure the left and right half are not expresions themselves
|
||||
// make sure the left and right half are not expressions themselves
|
||||
StringTokenizer illegalCharsTokenizer =
|
||||
new StringTokenizer(tokens[0], "()&|!=~><*", true);
|
||||
|
||||
@ -2443,7 +2443,7 @@ final public class LdapCtx extends ComponentDirContext
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether aliases are derefereced during resolution and searches.
|
||||
* Set whether aliases are dereferenced during resolution and searches.
|
||||
*/
|
||||
private void setDerefAliases(String deref) {
|
||||
if (deref != null) {
|
||||
|
@ -346,8 +346,8 @@ public final class LdapName implements Name {
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an attribute value formated according to RFC 2253,
|
||||
* returns the unformated value. Returns a string value as
|
||||
* Given an attribute value formatted according to RFC 2253,
|
||||
* returns the unformatted value. Returns a string value as
|
||||
* a string, and a binary value as a byte array.
|
||||
*/
|
||||
public static Object unescapeAttributeValue(String val) {
|
||||
@ -687,7 +687,7 @@ public final class LdapName implements Name {
|
||||
private final boolean binary;
|
||||
private final boolean valueCaseSensitive;
|
||||
|
||||
// If non-null, a canonical represention of the value suitable
|
||||
// If non-null, a canonical representation of the value suitable
|
||||
// for comparison using String.compareTo().
|
||||
private String comparable = null;
|
||||
|
||||
@ -842,8 +842,8 @@ public final class LdapName implements Name {
|
||||
}
|
||||
|
||||
/*
|
||||
* Given an attribute value formated according to RFC 2253,
|
||||
* returns the unformated value. Escapes and quotes are
|
||||
* Given an attribute value formatted according to RFC 2253,
|
||||
* returns the unformatted value. Escapes and quotes are
|
||||
* stripped away, and hex-encoded UTF-8 is converted to 16-bit
|
||||
* Unicode chars. Returns a string value as a String, and a
|
||||
* binary value as a byte array.
|
||||
|
@ -679,7 +679,7 @@ final class LdapReferralContext implements DirContext, LdapContext {
|
||||
|
||||
} catch (LdapReferralException e) {
|
||||
|
||||
// %%% VR - setNameResolved(true);
|
||||
// %%% setNameResolved(true);
|
||||
|
||||
// append (referrals from) the exception that generated this
|
||||
// context to the new exception, so that referral processing
|
||||
@ -897,7 +897,7 @@ final class LdapReferralContext implements DirContext, LdapContext {
|
||||
|
||||
/*
|
||||
* Use the attributes and scope components from the LDAP URL (if present)
|
||||
* to override the corrpesonding components supplied in SearchControls.
|
||||
* to override the corresponding components supplied in SearchControls.
|
||||
*/
|
||||
private SearchControls overrideAttributesAndScope(SearchControls cons) {
|
||||
SearchControls urlCons;
|
||||
|
@ -62,7 +62,7 @@ final class LdapRequest {
|
||||
cancelled = true;
|
||||
|
||||
// Unblock reader of pending request
|
||||
// Should only ever have atmost one waiter
|
||||
// Should only ever have at most one waiter
|
||||
notify();
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ final class LdapSchemaParser {
|
||||
// Object Class specific IDs
|
||||
private static final String ABSTRACT_ID = "ABSTRACT";
|
||||
private static final String STRUCTURAL_ID = "STRUCTURAL";
|
||||
private static final String AUXILARY_ID = "AUXILIARY";
|
||||
private static final String AUXILIARY_ID = "AUXILIARY";
|
||||
private static final String MUST_ID = "MUST";
|
||||
private static final String MAY_ID = "MAY";
|
||||
|
||||
@ -300,8 +300,8 @@ final class LdapSchemaParser {
|
||||
return new Object[] {currentName, attrs};
|
||||
}
|
||||
|
||||
// returns the index of the first whitespace char of a linear whitspace
|
||||
// sequince ending at the given position.
|
||||
// returns the index of the first whitespace char of a linear whitespace
|
||||
// sequence ending at the given position.
|
||||
final private static int findTrailingWhitespace(String string, int pos) {
|
||||
for(int i = pos; i > 0; i--) {
|
||||
if(string.charAt(i) != WHSP) {
|
||||
@ -423,7 +423,7 @@ final class LdapSchemaParser {
|
||||
if (tag.equals(OBSOLETE_ID) ||
|
||||
tag.equals(ABSTRACT_ID) ||
|
||||
tag.equals(STRUCTURAL_ID) ||
|
||||
tag.equals(AUXILARY_ID) ||
|
||||
tag.equals(AUXILIARY_ID) ||
|
||||
tag.equals(SINGLE_VAL_ID) ||
|
||||
tag.equals(COLLECTIVE_ID) ||
|
||||
tag.equals(NO_USER_MOD_ID)) {
|
||||
@ -819,7 +819,7 @@ final class LdapSchemaParser {
|
||||
count++;
|
||||
}
|
||||
|
||||
attr = attrs.get(AUXILARY_ID);
|
||||
attr = attrs.get(AUXILIARY_ID);
|
||||
if (attr != null) {
|
||||
objectDesc.append(writeBoolean(attr));
|
||||
count++;
|
||||
@ -856,7 +856,7 @@ final class LdapSchemaParser {
|
||||
attrId.equals(MUST_ID) ||
|
||||
attrId.equals(STRUCTURAL_ID) ||
|
||||
attrId.equals(DESC_ID) ||
|
||||
attrId.equals(AUXILARY_ID) ||
|
||||
attrId.equals(AUXILIARY_ID) ||
|
||||
attrId.equals(ABSTRACT_ID) ||
|
||||
attrId.equals(OBSOLETE_ID)) {
|
||||
continue;
|
||||
|
@ -156,7 +156,7 @@ final class LdapSearchEnumeration
|
||||
String[] reqAttrs;
|
||||
if ((reqAttrs = searchArgs.reqAttrs) != null) {
|
||||
// create an attribute set for those requested
|
||||
Attributes rattrs = new BasicAttributes(true); // caseignore
|
||||
Attributes rattrs = new BasicAttributes(true); // ignore case
|
||||
for (int i = 0; i < reqAttrs.length; i++) {
|
||||
rattrs.put(reqAttrs[i], null);
|
||||
}
|
||||
@ -213,8 +213,6 @@ final class LdapSearchEnumeration
|
||||
// Update search-specific variables
|
||||
LdapSearchEnumeration se = (LdapSearchEnumeration)ne;
|
||||
startName = se.startName;
|
||||
//VR - keep original args, don't overwite with current args
|
||||
// searchArgs = se.searchArgs;
|
||||
}
|
||||
|
||||
void setStartName(Name nm) {
|
||||
|
@ -162,7 +162,7 @@ final public class LdapURL extends Uri {
|
||||
}
|
||||
|
||||
/**
|
||||
* Derermines whether an LDAP URL has query components.
|
||||
* Determines whether an LDAP URL has query components.
|
||||
*/
|
||||
public static boolean hasQueryComponents(String url) {
|
||||
return (url.lastIndexOf('?') != -1);
|
||||
|
@ -62,7 +62,7 @@ class ServiceLocator {
|
||||
*
|
||||
* @param dn A string distinguished name (RFC 2253).
|
||||
* @return A domain name or null if none can be derived.
|
||||
* @throw InvalidNameException If the distinugished name is invalid.
|
||||
* @throw InvalidNameException If the distinguished name is invalid.
|
||||
*/
|
||||
static String mapDnToDomainName(String dn) throws InvalidNameException {
|
||||
if (dn == null) {
|
||||
|
@ -254,7 +254,7 @@ final class Connections implements PoolCallback {
|
||||
/**
|
||||
* Removes PooledConnection from list of connections.
|
||||
* The closing of the connection is separate from this method.
|
||||
* This method is called usually when the caller encouters an error
|
||||
* This method is called usually when the caller encounters an error
|
||||
* when using the connection and wants it removed from the pool.
|
||||
*
|
||||
* @return true if conn removed; false if it was not in pool
|
||||
|
@ -68,8 +68,8 @@ import javax.naming.NamingException;
|
||||
* whenever a pooled connection is requested or a call to remove the expired
|
||||
* connections is made. The monitoring is done regularly when idle connection
|
||||
* timeout is set as the PoolCleaner removes expired connections periodically.
|
||||
* As determined by the experiements, cleanup of resources using the
|
||||
* ReferenceQueue mechanism is reliable and has immidiate effect than the
|
||||
* As determined by experimentation, cleanup of resources using the
|
||||
* ReferenceQueue mechanism is reliable and has more immediate effect than the
|
||||
* finalizer approach.
|
||||
*
|
||||
* @author Rosanna Lee
|
||||
|
@ -96,7 +96,7 @@ public abstract class AtomicContext extends ComponentContext {
|
||||
* Resolves the nns for 'name' when the named context is acting
|
||||
* as an intermediate context.
|
||||
*
|
||||
* For a system that supports junctions, this would be equilvalent to
|
||||
* For a system that supports junctions, this would be equivalent to
|
||||
* a_lookup(name, cont);
|
||||
* because for junctions, an intermediate slash simply signifies
|
||||
* a syntactic separator.
|
||||
@ -487,7 +487,7 @@ public abstract class AtomicContext extends ComponentContext {
|
||||
resolve_to_nns_and_continue(name, cont);
|
||||
return null;
|
||||
} else {
|
||||
// use COmponentContext
|
||||
// use ComponentContext
|
||||
return super.c_getNameParser_nns(name, cont);
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public abstract class ComponentContext extends PartialCompositeContext {
|
||||
* as an intermediate context.
|
||||
*
|
||||
* For a system that supports only junctions, this would be
|
||||
* equilvalent to
|
||||
* equivalent to
|
||||
* c_lookup(name, cont);
|
||||
* because for junctions, an intermediate slash simply signifies
|
||||
* a syntactic separator.
|
||||
|
@ -172,7 +172,7 @@ public class Continuation extends ResolveResult {
|
||||
*
|
||||
* This method is typically called by _nns methods that have been
|
||||
* given a name to process. It might process part of that name but
|
||||
* encountered some error. Consequenetly, it would call setErrorNNS()
|
||||
* encountered some error. Consequently, it would call setErrorNNS()
|
||||
* with the remaining name. Since the _nns method was expected to
|
||||
* operate upon the "nns" of the original name, the remaining name
|
||||
* must include the "nns". That's why this method adds a trailing "/".
|
||||
@ -219,7 +219,7 @@ public class Continuation extends ResolveResult {
|
||||
*
|
||||
* This method is typically called by methods that have been
|
||||
* given a name to process. It might process part of that name but
|
||||
* encountered some error. Consequenetly, it would call setError()
|
||||
* encountered some error. Consequently, it would call setError()
|
||||
* with the resolved object and the remaining name.
|
||||
*<p>
|
||||
* After this method is called, isContinuing() returns false.
|
||||
|
@ -182,14 +182,14 @@ public class ContextEnumerator implements NamingEnumeration<Binding> {
|
||||
|
||||
if (!currentReturned) {
|
||||
// returning parent
|
||||
if(debug) {System.out.println("getNextDescedant: simple case");}
|
||||
if(debug) {System.out.println("getNextDescendant: simple case");}
|
||||
|
||||
currentReturned = true;
|
||||
return currentChild;
|
||||
|
||||
} else if (currentChildExpanded && currentChildEnum.hasMore()) {
|
||||
|
||||
if(debug) {System.out.println("getNextDescedant: expanded case");}
|
||||
if(debug) {System.out.println("getNextDescendant: expanded case");}
|
||||
|
||||
// if the current child is expanded, use it's enumerator
|
||||
return currentChildEnum.next();
|
||||
@ -197,7 +197,7 @@ public class ContextEnumerator implements NamingEnumeration<Binding> {
|
||||
} else {
|
||||
|
||||
// Ready to go onto next child
|
||||
if(debug) {System.out.println("getNextDescedant: next case");}
|
||||
if(debug) {System.out.println("getNextDescendant: next case");}
|
||||
|
||||
prepNextChild();
|
||||
return getNextDescendant();
|
||||
|
@ -881,8 +881,8 @@ public class HierMemDirCtx implements DirContext {
|
||||
}
|
||||
}
|
||||
|
||||
// CompundNames's HashCode() method isn't good enough for many string.
|
||||
// The only prupose of this subclass is to have a more discerning
|
||||
// CompoundNames's HashCode() method isn't good enough for many strings.
|
||||
// The only purpose of this subclass is to have a more discerning
|
||||
// hash function. We'll make up for the performance hit by caching
|
||||
// the hash value.
|
||||
|
||||
|
@ -152,7 +152,7 @@ final public class LazySearchEnumerationImpl
|
||||
} else if (useFactory) {
|
||||
try {
|
||||
// Give name only if context non-null,
|
||||
// otherewise, name will be interpreted relative
|
||||
// otherwise, name will be interpreted relative
|
||||
// to initial context (not what we want)
|
||||
Name nm = (context != null ?
|
||||
new CompositeName(next.getName()) : null);
|
||||
|
@ -256,7 +256,7 @@ public class SearchFilter implements AttrFilter {
|
||||
static final int LESS_MATCH = 4;
|
||||
|
||||
/**
|
||||
* A class for dealing wtih atomic filters
|
||||
* A class for dealing with atomic filters
|
||||
*/
|
||||
final class AtomicFilter implements StringFilter {
|
||||
private String attrID;
|
||||
@ -369,7 +369,7 @@ public class SearchFilter implements AttrFilter {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (debug) {System.out.println("AtomicFilter: unkown " +
|
||||
if (debug) {System.out.println("AtomicFilter: unknown " +
|
||||
"matchType");}
|
||||
}
|
||||
}
|
||||
@ -434,7 +434,7 @@ public class SearchFilter implements AttrFilter {
|
||||
|
||||
|
||||
/**
|
||||
* Creates an LDAP filter as a conjuction of the attributes supplied.
|
||||
* Creates an LDAP filter as a conjunction of the attributes supplied.
|
||||
*/
|
||||
public static String format(Attributes attrs) throws NamingException {
|
||||
if (attrs == null || attrs.size() == 0) {
|
||||
|
@ -168,7 +168,7 @@ abstract public class GenericURLContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
// else 0 or 1 iniitial slashes; start is unchanged
|
||||
// else 0 or 1 initial slashes; start is unchanged
|
||||
return url.substring(0, start);
|
||||
}
|
||||
|
||||
|
@ -562,7 +562,7 @@ final public class ldapURLContext
|
||||
}
|
||||
|
||||
// Search using the LDAP URL in name.
|
||||
// LDAP URL query components override the search argments.
|
||||
// LDAP URL query components override the search arguments.
|
||||
private NamingEnumeration<SearchResult> searchUsingURL(String name)
|
||||
throws NamingException {
|
||||
|
||||
|
@ -723,7 +723,7 @@ public interface DirContext extends Context {
|
||||
* specified set of attributes.
|
||||
* This method returns all the attributes of such objects.
|
||||
* It is equivalent to supplying null as
|
||||
* the <tt>atributesToReturn</tt> parameter to the method
|
||||
* the <tt>attributesToReturn</tt> parameter to the method
|
||||
* <code>search(Name, Attributes, String[])</code>.
|
||||
* <br>
|
||||
* See {@link #search(Name, Attributes, String[])} for a full description.
|
||||
|
@ -421,7 +421,7 @@ public class Rdn implements Serializable, Comparable<Object> {
|
||||
private String type;
|
||||
private Object value;
|
||||
|
||||
// If non-null, a cannonical representation of the value suitable
|
||||
// If non-null, a canonical representation of the value suitable
|
||||
// for comparison using String.compareTo()
|
||||
private String comparable = null;
|
||||
|
||||
@ -571,10 +571,10 @@ public class Rdn implements Serializable, Comparable<Object> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Given an attribute value string formated according to the rules
|
||||
* Given an attribute value string formatted according to the rules
|
||||
* specified in
|
||||
* <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>,
|
||||
* returns the unformated value. Escapes and quotes are
|
||||
* returns the unformatted value. Escapes and quotes are
|
||||
* stripped away, and hex-encoded UTF-8 is converted to equivalent
|
||||
* UTF-16 characters. Returns a string value as a String, and a
|
||||
* binary value as a byte array.
|
||||
|
@ -188,7 +188,7 @@ final public class SortControl extends BasicControl {
|
||||
/*
|
||||
* Encodes the sort control's value using ASN.1 BER.
|
||||
* The result includes the BER tag and length for the control's value but
|
||||
* does not include the control's object identifer and criticality setting.
|
||||
* does not include the control's object identifier and criticality setting.
|
||||
*
|
||||
* @param sortKeys A non-null list of keys to sort by.
|
||||
* @return A possibly null byte array representing the ASN.1 BER encoded
|
||||
|
Loading…
x
Reference in New Issue
Block a user