tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r379187 - in /tomcat/container/branches/tc4.1.x: catalina/src/share/org/apache/catalina/core/ catalina/src/share/org/apache/catalina/servlets/ webapps/examples/WEB-INF/classes/
Date Mon, 20 Feb 2006 18:02:54 GMT
Author: markt
Date: Mon Feb 20 10:02:51 2006
New Revision: 379187

URL: http://svn.apache.org/viewcvs?rev=379187&view=rev
Log:
enum -> enumeration to allow building on Java 5.0 generally and Gump in particular without
having to set source compatibility to 1.4 or lower.

Modified:
    tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
    tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
    tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
    tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/JndiServlet.java

Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/NamingContextListener.java?rev=379187&r1=379186&r2=379187&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
(original)
+++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
Mon Feb 20 10:02:51 2006
@@ -1014,9 +1014,9 @@
         if (resourceParameters == null)
             return;
         Hashtable params = resourceParameters.getParameters();
-        Enumeration enum = params.keys();
-        while (enum.hasMoreElements()) {
-            String paramName = (String) enum.nextElement();
+        Enumeration enumeration = params.keys();
+        while (enumeration.hasMoreElements()) {
+            String paramName = (String) enumeration.nextElement();
             String paramValue = (String) params.get(paramName);
             StringRefAddr refAddr = new StringRefAddr(paramName, paramValue);
             ref.add(refAddr);

Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java?rev=379187&r1=379186&r2=379187&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
(original)
+++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
Mon Feb 20 10:02:51 2006
@@ -1431,12 +1431,13 @@
 
             // Render the directory entries within this directory
             DirContext directory = resourceInfo.directory;
-            NamingEnumeration enum =
+            NamingEnumeration enumeration =
                 resourceInfo.resources.list(resourceInfo.path);
             boolean shade = false;
-            while (enum.hasMoreElements()) {
+            while (enumeration.hasMoreElements()) {
 
-                NameClassPair ncPair = (NameClassPair) enum.nextElement();
+                NameClassPair ncPair =
+                    (NameClassPair) enumeration.nextElement();
                 String resourceName = ncPair.getName();
                 ResourceInfo childResourceInfo =
                     new ResourceInfo(resourceName, directory);

Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java?rev=379187&r1=379186&r2=379187&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
(original)
+++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java
Mon Feb 20 10:02:51 2006
@@ -521,10 +521,11 @@
                 if ((object instanceof DirContext) && (depth > 0)) {
 
                     try {
-                        NamingEnumeration enum = resources.list(currentPath);
-                        while (enum.hasMoreElements()) {
+                        NamingEnumeration enumeration =
+                            resources.list(currentPath);
+                        while (enumeration.hasMoreElements()) {
                             NameClassPair ncPair =
-                                (NameClassPair) enum.nextElement();
+                                (NameClassPair) enumeration.nextElement();
                             String newPath = currentPath;
                             if (!(newPath.endsWith("/")))
                                 newPath += "/";
@@ -1643,9 +1644,10 @@
             }
 
             try {
-                NamingEnumeration enum = resources.list(source);
-                while (enum.hasMoreElements()) {
-                    NameClassPair ncPair = (NameClassPair) enum.nextElement();
+                NamingEnumeration enumeration = resources.list(source);
+                while (enumeration.hasMoreElements()) {
+                    NameClassPair ncPair =
+                        (NameClassPair) enumeration.nextElement();
                     String childDest = dest;
                     if (!childDest.equals("/"))
                         childDest += "/";
@@ -1823,17 +1825,17 @@
         if (lockTokenHeader == null)
             lockTokenHeader = "";
 
-        Enumeration enum = null;
+        Enumeration enumeration = null;
         try {
-            enum = resources.list(path);
+            enumeration = resources.list(path);
         } catch (NamingException e) {
             errorList.put(path, new Integer
                 (WebdavStatus.SC_INTERNAL_SERVER_ERROR));
             return;
         }
 
-        while (enum.hasMoreElements()) {
-            NameClassPair ncPair = (NameClassPair) enum.nextElement();
+        while (enumeration.hasMoreElements()) {
+            NameClassPair ncPair = (NameClassPair) enumeration.nextElement();
             String childName = path;
             if (!childName.equals("/"))
                 childName += "/";

Modified: tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/JndiServlet.java
URL: http://svn.apache.org/viewcvs/tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/JndiServlet.java?rev=379187&r1=379186&r2=379187&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/JndiServlet.java (original)
+++ tomcat/container/branches/tc4.1.x/webapps/examples/WEB-INF/classes/JndiServlet.java Mon
Feb 20 10:02:51 2006
@@ -70,16 +70,16 @@
         try {
             Context envCtx = (Context) ctx.lookup("java:/comp/env/");
             out.println("list() on /comp/env Context : ");
-            NamingEnumeration enum = ctx.list("java:/comp/env/");
-            while (enum.hasMoreElements()) {
+            NamingEnumeration enumeration = ctx.list("java:/comp/env/");
+            while (enumeration.hasMoreElements()) {
                 out.print("Binding : ");
-                out.println(enum.nextElement().toString());
+                out.println(enumeration.nextElement().toString());
             }
             out.println("listBindings() on /comp/env Context : ");
-            enum = ctx.listBindings("java:/comp/env/");
-            while (enum.hasMoreElements()) {
+            enumeration = ctx.listBindings("java:/comp/env/");
+            while (enumeration.hasMoreElements()) {
                 out.print("Binding : ");
-                out.println(enum.nextElement().toString());
+                out.println(enumeration.nextElement().toString());
             }
         } catch (NamingException e) {
             out.println("JNDI lookup failed : " + e);



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


Mime
View raw message