From 0d430c965d62cefd514862c3b2896b2e77ce63f2 Mon Sep 17 00:00:00 2001 From: Joerg Brunsmann Date: Wed, 28 Mar 2001 00:32:02 +0000 Subject: InitialContext.java (init): Fix typo. 2001-03-27 Joerg Brunsmann * javax/naming/InitialContext.java (init): Fix typo. (composeName): Remove unnecessary semicolon. (addToEnvironment): Remove unnecessary semicolon. (addToEnvironment): Use put() instead of add(). * javax/naming/InitialContext.java (InitialContext): Make public. (destroySubcontext): Method doesn't return a result. * javax/naming/Context.java: Import java.util.Hashtable. * javax/naming/Name.java: Import java.util.Enumeration. From-SVN: r40888 --- libjava/javax/naming/Context.java | 2 ++ libjava/javax/naming/InitialContext.java | 16 ++++++++-------- libjava/javax/naming/Name.java | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'libjava/javax') diff --git a/libjava/javax/naming/Context.java b/libjava/javax/naming/Context.java index d2474b9a6a5..32dab766fbe 100644 --- a/libjava/javax/naming/Context.java +++ b/libjava/javax/naming/Context.java @@ -8,6 +8,8 @@ details. */ package javax.naming; +import java.util.Hashtable; + public interface Context { // Property with name of the inital context factory to use diff --git a/libjava/javax/naming/InitialContext.java b/libjava/javax/naming/InitialContext.java index f0404a5a324..a670d7b204e 100644 --- a/libjava/javax/naming/InitialContext.java +++ b/libjava/javax/naming/InitialContext.java @@ -26,7 +26,7 @@ public class InitialContext implements Context protected boolean gotDefault = false; protected Hashtable myProps; - InitialContext (Hashtable environment) + public InitialContext (Hashtable environment) { init (environment); } @@ -37,7 +37,7 @@ public class InitialContext implements Context init (null); } - InitialContext () + public InitialContext () { init (null); } @@ -116,7 +116,7 @@ public class InitialContext implements Context // FIXME: Is this enough? private static final String[] colon_list = { - Context.OBJECT_FACTORIS, + Context.OBJECT_FACTORIES, Context.URL_PKG_PREFIXES, Context.STATE_FACTORIES }; @@ -256,12 +256,12 @@ public class InitialContext implements Context public void destroySubcontext (Name name) throws NamingException { - return getURLOrDefaultInitCtx (name).destroySubcontext (name); + getURLOrDefaultInitCtx (name).destroySubcontext (name); } public void destroySubcontext (String name) throws NamingException { - return getURLOrDefaultInitCtx (name).destroySubcontext (name); + getURLOrDefaultInitCtx (name).destroySubcontext (name); } public Context createSubcontext (Name name) throws NamingException @@ -300,15 +300,15 @@ public class InitialContext implements Context } public String composeName (String name, - String prefix) throws NamingException; + String prefix) throws NamingException { return getURLOrDefaultInitCtx (name).composeName (name, prefix); } public Object addToEnvironment (String propName, - Object propVal) throws NamingException; + Object propVal) throws NamingException { - myProps.add (propName, propVal); + myProps.put (propName, propVal); } public Object removeFromEnvironment (String propName) throws NamingException diff --git a/libjava/javax/naming/Name.java b/libjava/javax/naming/Name.java index b7eb4f14ece..5fe612a2acc 100644 --- a/libjava/javax/naming/Name.java +++ b/libjava/javax/naming/Name.java @@ -8,6 +8,7 @@ details. */ package javax.naming; +import java.util.Enumeration; import java.io.Serializable; public interface Name extends Cloneable, Serializable -- cgit v1.2.1