You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ni...@apache.org on 2005/04/01 12:09:55 UTC
svn commit: r159674 -
struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java
Author: niallp
Date: Fri Apr 1 02:09:54 2005
New Revision: 159674
URL: http://svn.apache.org/viewcvs?view=rev&rev=159674
Log:
Post Changes to 1.2.x Branch - enum is a keyword in Java 5
Modified:
struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java
Modified: struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java
URL: http://svn.apache.org/viewcvs/struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java?view=diff&r1=159673&r2=159674
==============================================================================
--- struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java (original)
+++ struts/core/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/util/IteratorAdapter.java Fri Apr 1 02:09:54 2005
@@ -18,6 +18,7 @@
package org.apache.struts.util;
+import java.util.Enumeration;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -32,23 +33,23 @@
*/
public class IteratorAdapter implements Iterator {
- private java.util.Enumeration enum;
+ private Enumeration e;
- public IteratorAdapter(java.util.Enumeration enum) {
- this.enum = enum;
+ public IteratorAdapter(Enumeration e) {
+ this.e = e;
}
public boolean hasNext() {
- return enum.hasMoreElements();
+ return e.hasMoreElements();
}
public Object next() {
- if (!enum.hasMoreElements()) {
+ if (!e.hasMoreElements()) {
throw new NoSuchElementException("IteratorAdaptor.next() has no more elements");
}
- return enum.nextElement();
+ return e.nextElement();
}
public void remove() {
- throw new java.lang.UnsupportedOperationException("Method IteratorAdaptor.remove() not implemented");
+ throw new UnsupportedOperationException("Method IteratorAdaptor.remove() not implemented");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org