Commits

Anonymous committed 847b838

o J2SDK 1.5 compliancy (enum is keyword)

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@417573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 3b7aa98

Comments (0)

Files changed (9)

src/java/com/opensymphony/webwork/dispatcher/ApplicationMap.java

     public void clear() {
         entries = null;
 
-        Enumeration enum = context.getAttributeNames();
+        Enumeration e = context.getAttributeNames();
 
-        while (enum.hasMoreElements()) {
-            context.removeAttribute(enum.nextElement().toString());
+        while (e.hasMoreElements()) {
+            context.removeAttribute(e.nextElement().toString());
         }
     }
 
             entries = new HashSet();
 
             // Add servlet context attributes
-            Enumeration enum = context.getAttributeNames();
+            Enumeration enumeration = context.getAttributeNames();
 
-            while (enum.hasMoreElements()) {
-                final String key = enum.nextElement().toString();
+            while (enumeration.hasMoreElements()) {
+                final String key = enumeration.nextElement().toString();
                 final Object value = context.getAttribute(key);
                 entries.add(new Map.Entry() {
                         public boolean equals(Object obj) {
             }
 
             // Add servlet context init params
-            enum = context.getInitParameterNames();
+            enumeration = context.getInitParameterNames();
 
-            while (enum.hasMoreElements()) {
-                final String key = enum.nextElement().toString();
+            while (enumeration.hasMoreElements()) {
+                final String key = enumeration.nextElement().toString();
                 final Object value = context.getInitParameter(key);
                 entries.add(new Map.Entry() {
                         public boolean equals(Object obj) {

src/java/com/opensymphony/webwork/dispatcher/SessionMap.java

             if (entries == null) {
                 entries = new HashSet();
 
-                Enumeration enum = session.getAttributeNames();
+                Enumeration enumeration = session.getAttributeNames();
 
-                while (enum.hasMoreElements()) {
-                    final String key = enum.nextElement().toString();
+                while (enumeration.hasMoreElements()) {
+                    final String key = enumeration.nextElement().toString();
                     final Object value = session.getAttribute(key);
                     entries.add(new Map.Entry() {
                             public boolean equals(Object obj) {

src/java/com/opensymphony/webwork/dispatcher/multipart/MultiPartRequestWrapper.java

      */
     public Map getParameterMap() {
         Map map = new HashMap();
-        Enumeration enum = getParameterNames();
+        Enumeration enumeration = getParameterNames();
 
-        while (enum.hasMoreElements()) {
-            String name = (String) enum.nextElement();
+        while (enumeration.hasMoreElements()) {
+            String name = (String) enumeration.nextElement();
             map.put(name, this.getParameterValues(name));
         }
 

src/java/com/opensymphony/webwork/dispatcher/multipart/PellMultiPartRequest.java

     }
 
     public String[] getParameterValues(String name) {
-        Enumeration enum = multi.getURLParameters(name);
+        Enumeration enumeration = multi.getURLParameters(name);
 
-        if (!enum.hasMoreElements()) {
+        if (!enumeration.hasMoreElements()) {
             return null;
         }
 
         List values = new ArrayList();
 
-        while (enum.hasMoreElements()) {
-            values.add(enum.nextElement());
+        while (enumeration.hasMoreElements()) {
+            values.add(enumeration.nextElement());
         }
 
         return (String[]) values.toArray(new String[values.size()]);

src/java/com/opensymphony/webwork/util/FastByteArrayOutputStream.java

         int pos = 0;
 
         if (buffers != null) {
-            Iterator enum = buffers.iterator();
+            Iterator iter = buffers.iterator();
 
-            while (enum.hasNext()) {
-                byte[] bytes = (byte[]) enum.next();
+            while (iter.hasNext()) {
+                byte[] bytes = (byte[]) iter.next();
                 System.arraycopy(bytes, 0, data, pos, blockSize);
                 pos += blockSize;
             }
     public void writeTo(OutputStream out) throws IOException {
         // Check if we have a list of buffers
         if (buffers != null) {
-            Iterator enum = buffers.iterator();
+            Iterator iter = buffers.iterator();
 
-            while (enum.hasNext()) {
-                byte[] bytes = (byte[]) enum.next();
+            while (iter.hasNext()) {
+                byte[] bytes = (byte[]) iter.next();
                 out.write(bytes, 0, blockSize);
             }
         }
     public void writeTo(RandomAccessFile out) throws IOException {
         // Check if we have a list of buffers
         if (buffers != null) {
-            Iterator enum = buffers.iterator();
+            Iterator iter = buffers.iterator();
 
-            while (enum.hasNext()) {
-                byte[] bytes = (byte[]) enum.next();
+            while (iter.hasNext()) {
+                byte[] bytes = (byte[]) iter.next();
                 out.write(bytes, 0, blockSize);
             }
         }
     public void writeTo(JspWriter out, String encoding) throws IOException {
         // Check if we have a list of buffers
         if (buffers != null) {
-            Iterator enum = buffers.iterator();
+            Iterator iter = buffers.iterator();
 
-            while (enum.hasNext()) {
-                byte[] bytes = (byte[]) enum.next();
+            while (iter.hasNext()) {
+                byte[] bytes = (byte[]) iter.next();
 
                 if (encoding != null) {
                     out.write(new String(bytes, encoding));

src/java/com/opensymphony/webwork/util/IteratorFilterSupport.java

 
     // Wrapper for enumerations
     public class EnumerationIterator implements Iterator {
-        Enumeration enum;
+        Enumeration enumeration;
 
         public EnumerationIterator(Enumeration aEnum) {
-            enum = aEnum;
+            enumeration = aEnum;
         }
 
         public boolean hasNext() {
-            return enum.hasMoreElements();
+            return enumeration.hasMoreElements();
         }
 
         public Object next() {
-            return enum.nextElement();
+            return enumeration.nextElement();
         }
 
         public void remove() {

src/java/com/opensymphony/webwork/util/MakeIterator.java

 
             iterator = list.iterator();
         } else if (value instanceof Enumeration) {
-            Enumeration enum = (Enumeration) value;
+            Enumeration enumeration = (Enumeration) value;
             ArrayList list = new ArrayList();
 
-            while (enum.hasMoreElements()) {
-                list.add(enum.nextElement());
+            while (enumeration.hasMoreElements()) {
+                list.add(enumeration.nextElement());
             }
 
             iterator = list.iterator();

src/java/com/opensymphony/webwork/views/jsp/IncludeTag.java

             String concat = "";
 
             // Set parameters
-            Iterator enum = params.entrySet().iterator();
+            Iterator iter = params.entrySet().iterator();
 
-            while (enum.hasNext()) {
-                Map.Entry entry = (Map.Entry) enum.next();
+            while (iter.hasNext()) {
+                Map.Entry entry = (Map.Entry) iter.next();
                 Object name = entry.getKey();
                 List values = (List) entry.getValue();
 

src/java/com/opensymphony/webwork/views/util/UrlHelper.java

             }
 
             // Set params
-            Iterator enum = params.entrySet().iterator();
+            Iterator iter = params.entrySet().iterator();
 
             String[] valueHolder = new String[1];
 
-            while (enum.hasNext()) {
-                Map.Entry entry = (Map.Entry) enum.next();
+            while (iter.hasNext()) {
+                Map.Entry entry = (Map.Entry) iter.next();
                 String name = (String) entry.getKey();
                 Object value = entry.getValue();
 
                     }
                 }
 
-                if (enum.hasNext()) {
+                if (iter.hasNext()) {
                     link.append("&");
                 }
             }