I'm checking this in on the generics branch.

This genericizes some things in javax.naming.

Tom

2006-06-04  Tom Tromey  <[EMAIL PROTECTED]>

        * javax/naming/Context.java (list): Genericized.
        (listBindings): Likewise.
        * javax/naming/Reference.java (addrs): Genericized.
        * javax/naming/InitialContext.java (myProps): Fixed type.
        (init): Genericized.

Index: javax/naming/Context.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/naming/Context.java,v
retrieving revision 1.2.2.3
diff -u -r1.2.2.3 Context.java
--- javax/naming/Context.java   29 May 2006 16:19:46 -0000      1.2.2.3
+++ javax/naming/Context.java   4 Jun 2006 20:30:43 -0000
@@ -270,7 +270,7 @@
    * @return the enumeration over the names, known for the given subcontext.
    * @throws NamingException
    */
-  NamingEnumeration list(Name name) throws NamingException;
+  NamingEnumeration<NameClassPair> list(Name name) throws NamingException;
 
   /**
    * Creates and returns the enumeration over the name bindings that are 
present
@@ -284,7 +284,7 @@
    * @return the enumeration over the names, known for the given subcontext.
    * @throws NamingException
    */
-  NamingEnumeration list(String name) throws NamingException;
+  NamingEnumeration<NameClassPair> list(String name) throws NamingException;
 
   /**
    * Creates and returns the enumeration over the name - object bindings that
@@ -297,7 +297,7 @@
    * @return the enumeration over the names, known for the given subcontext.
    * @throws NamingException
    */
-  NamingEnumeration listBindings(Name name) throws NamingException;
+  NamingEnumeration<Binding> listBindings(Name name) throws NamingException;
 
   /**
    * Creates and returns the enumeration over the name - object bindings that
@@ -310,7 +310,7 @@
    * @return the enumeration over the names, known for the given subcontext.
    * @throws NamingException
    */
-  NamingEnumeration listBindings(String name) throws NamingException;
+  NamingEnumeration<Binding> listBindings(String name) throws NamingException;
 
   /**
    * Creates the new naming subcontext and binds it to the current (this)
Index: javax/naming/InitialContext.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/naming/InitialContext.java,v
retrieving revision 1.7.2.4
diff -u -r1.7.2.4 InitialContext.java
--- javax/naming/InitialContext.java    29 May 2006 16:19:46 -0000      1.7.2.4
+++ javax/naming/InitialContext.java    4 Jun 2006 20:30:43 -0000
@@ -73,7 +73,7 @@
   /**
    * The environment, associated with this initial context.
    */
-  protected Hashtable<String,Object> myProps;
+  protected Hashtable<Object,Object> myProps;
   
   /**
    * The list of the properties, to that the second alternative value must
@@ -166,13 +166,13 @@
    *          not later reuse this structure for other purposes.
    * @since 1.3
    */
-  protected void init(Hashtable environment) throws NamingException
+  protected void init(Hashtable<?, ?> environment) throws NamingException
   {
     // If is documented that the caller should not modify the environment.
     if (environment != null)
-      myProps = environment;
+      myProps = (Hashtable<Object, Object>) environment;
     else
-      myProps = new Hashtable<String,Object>();
+      myProps = new Hashtable<Object, Object>();
 
     Applet napplet = (Applet) myProps.get(Context.APPLET);
 
Index: javax/naming/Reference.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/naming/Reference.java,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 Reference.java
--- javax/naming/Reference.java 29 May 2006 16:19:46 -0000      1.1.2.5
+++ javax/naming/Reference.java 4 Jun 2006 20:30:43 -0000
@@ -58,7 +58,7 @@
    * The list of addresses, stored in this reference. The object may be 
    * have by several different addresses.
    */
-  protected Vector addrs;
+  protected Vector<RefAddr> addrs;
   
   /**
    * The name of the class factory to create an instance of the object,

Reply via email to