commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject cvs commit: jakarta-commons/configuration/src/java/org/apache/commons/configuration JNDIConfiguration.java
Date Wed, 02 Jun 2004 16:33:46 GMT
ebourg      2004/06/02 09:33:46

  Modified:    configuration/src/java/org/apache/commons/configuration
                        JNDIConfiguration.java
  Log:
  Renamed the 'enum' variables into 'enumeration' for JDK 1.5 compatibility (issue spotted
by Jörg Schaible, Bug 28274)
  
  Revision  Changes    Path
  1.12      +10 -10    jakarta-commons/configuration/src/java/org/apache/commons/configuration/JNDIConfiguration.java
  
  Index: JNDIConfiguration.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/configuration/src/java/org/apache/commons/configuration/JNDIConfiguration.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JNDIConfiguration.java	28 Apr 2004 22:58:58 -0000	1.11
  +++ JNDIConfiguration.java	2 Jun 2004 16:33:46 -0000	1.12
  @@ -72,16 +72,16 @@
        * values to the list of keys found.
        *
        * @param keys All the keys that have been found.
  -     * @param enum An enumeration of all the elements found at a specific context
  +     * @param parentContext The parent context
        * @param key What key we are building on.
        * @throws NamingException If JNDI has an issue.
        */
       private void recursiveGetKeys(List keys, Context parentContext, String key) throws
NamingException
       {
  -        NamingEnumeration enum = parentContext.list("");
  -        while (enum.hasMoreElements())
  +        NamingEnumeration enumeration = parentContext.list("");
  +        while (enumeration.hasMoreElements())
           {
  -            Object o = enum.next();
  +            Object o = enumeration.next();
               
               NameClassPair nameClassPair = (NameClassPair) o;
               StringBuffer newKey = new StringBuffer();
  @@ -167,13 +167,13 @@
        * @return The context at that key's location in the JNDI tree, or null if not found
        * @throws NamingException if JNDI has an issue
        */
  -    private Context getStartingContextPoint(List keys, Context parentContext, NamingEnumeration
enum) throws NamingException
  +    private Context getStartingContextPoint(List keys, Context parentContext, NamingEnumeration
enumeration) throws NamingException
       {
           String keyToSearchFor = (String) keys.get(0);
           log.debug("Key to search for is " + keyToSearchFor);
  -        while (enum.hasMoreElements())
  +        while (enumeration.hasMoreElements())
           {            
  -            NameClassPair nameClassPair = (NameClassPair) enum.next();
  +            NameClassPair nameClassPair = (NameClassPair) enumeration.next();
               Object o = parentContext.lookup(nameClassPair.getName());
               log.debug(
                   "Binding for name: "
  @@ -217,8 +217,8 @@
       {
           try
           {
  -            NamingEnumeration enum = getContext().list("");
  -            return !enum.hasMore();
  +            NamingEnumeration enumeration = getContext().list("");
  +            return !enumeration.hasMore();
           }
           catch (NamingException ne)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message