geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject cvs commit: incubator-geronimo/modules/naming/src/test/org/apache/geronimo/naming/java BasicContextTest.java
Date Tue, 22 Jun 2004 01:34:24 GMT
jboynes     2004/06/21 18:34:24

  Modified:    modules/naming/src/test/org/apache/geronimo/naming/java
                        BasicContextTest.java
  Log:
  enum is a reserved word in 1.5
  
  Revision  Changes    Path
  1.4       +13 -13    incubator-geronimo/modules/naming/src/test/org/apache/geronimo/naming/java/BasicContextTest.java
  
  Index: BasicContextTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/naming/src/test/org/apache/geronimo/naming/java/BasicContextTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasicContextTest.java	10 Mar 2004 09:59:09 -0000	1.3
  +++ BasicContextTest.java	22 Jun 2004 01:34:24 -0000	1.4
  @@ -84,7 +84,7 @@
       }
   
       public void testList() throws NamingException {
  -        NamingEnumeration enum;
  +        NamingEnumeration ne;
           Map expected;
           Map result;
   
  @@ -93,22 +93,22 @@
               Map.Entry entry = (Map.Entry) i.next();
               expected.put(entry.getKey(), entry.getValue().getClass().getName());
           }
  -        enum = envContext.list("");
  +        ne = envContext.list("");
           result = new HashMap();
  -        while (enum.hasMore()) {
  -            NameClassPair pair = (NameClassPair) enum.next();
  +        while (ne.hasMore()) {
  +            NameClassPair pair = (NameClassPair) ne.next();
               result.put(pair.getName(), pair.getClassName());
           }
           assertEquals(expected, result);
   
           try {
  -            enum.next();
  +            ne.next();
               fail();
           } catch (NoSuchElementException e) {
               // ok
           }
           try {
  -            enum.nextElement();
  +            ne.nextElement();
               fail();
           } catch (NoSuchElementException e) {
               // ok
  @@ -116,12 +116,12 @@
       }
   
       public void testListBindings() throws NamingException {
  -        NamingEnumeration enum;
  -        enum = envContext.listBindings("");
  +        NamingEnumeration ne;
  +        ne = envContext.listBindings("");
           int count = 0;
  -        while (enum.hasMore()) {
  +        while (ne.hasMore()) {
               count ++;
  -            Binding pair = (Binding) enum.next();
  +            Binding pair = (Binding) ne.next();
               assertTrue(envBinding.containsKey(pair.getName()));
               if (! (envBinding.get(pair.getName()) instanceof ReadOnlyContext)) {
                   assertEquals(pair.getObject(), envBinding.get(pair.getName()));
  @@ -130,13 +130,13 @@
           assertEquals(envBinding.size(), count);
   
           try {
  -            enum.next();
  +            ne.next();
               fail();
           } catch (NoSuchElementException e) {
               // ok
           }
           try {
  -            enum.nextElement();
  +            ne.nextElement();
               fail();
           } catch (NoSuchElementException e) {
               // ok
  
  
  

Mime
View raw message