You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by dl...@apache.org on 2004/11/28 21:46:07 UTC

svn commit: r106845 - /jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java /jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java /jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java

Author: dlr
Date: Sun Nov 28 12:46:06 2004
New Revision: 106845

URL: http://svn.apache.org/viewcvs?view=rev&rev=106845
Log:
* src/java/org/apache/velocity/runtime/parser/Parser.java
* src/java/org/apache/velocity/texen/Generator.java
* src/java/org/apache/velocity/util/EnumerationIterator.java
  Replaced use of JDK 1.5 reserved word "enum" with "enumeration" to
  allow compilation of Velocity on that platform.


Issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=32416
Submitted by: Shinobu Kawai

Modified:
   jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java
   jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java
   jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java

Modified: jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java
Url: http://svn.apache.org/viewcvs/jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java?view=diff&rev=106845&p1=jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java&r1=106844&p2=jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java&r2=106845
==============================================================================
--- jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java	(original)
+++ jakarta/velocity/trunk/src/java/org/apache/velocity/runtime/parser/Parser.java	Sun Nov 28 12:46:06 2004
@@ -3379,8 +3379,8 @@
         jj_expentry[i] = jj_lasttokens[i];
       }
       boolean exists = false;
-      for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) {
-        int[] oldentry = (int[])(enum.nextElement());
+      for (java.util.Enumeration enumeration = jj_expentries.elements(); enumeration.hasMoreElements();) {
+        int[] oldentry = (int[])(enumeration.nextElement());
         if (oldentry.length == jj_expentry.length) {
           exists = true;
           for (int i = 0; i < jj_expentry.length; i++) {

Modified: jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java
Url: http://svn.apache.org/viewcvs/jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java?view=diff&rev=106845&p1=jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java&r1=106844&p2=jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java&r2=106845
==============================================================================
--- jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java	(original)
+++ jakarta/velocity/trunk/src/java/org/apache/velocity/texen/Generator.java	Sun Nov 28 12:46:06 2004
@@ -42,7 +42,7 @@
  *
  * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
  * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
- * @version $Id: Generator.java,v 1.22 2004/03/19 17:13:39 dlr Exp $ 
+ * @version $Id$ 
  */
 public class Generator
 {
@@ -451,10 +451,10 @@
      */
     protected void fillContextHash (Context context, Hashtable objs)
     {
-        Enumeration enum = objs.keys();
-        while (enum.hasMoreElements())
+        Enumeration enumeration = objs.keys();
+        while (enumeration.hasMoreElements())
         {
-            String key = enum.nextElement().toString();
+            String key = enumeration.nextElement().toString();
             context.put (key, objs.get(key));
         }
     }
@@ -479,11 +479,11 @@
      */
     protected void fillContextProperties (Context context)
     {
-        Enumeration enum = props.propertyNames();
+        Enumeration enumeration = props.propertyNames();
         
-        while (enum.hasMoreElements())
+        while (enumeration.hasMoreElements())
         {
-            String nm = (String)enum.nextElement();
+            String nm = (String) enumeration.nextElement();
             if (nm.startsWith ("context.objects."))
             {
                 

Modified: jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java
Url: http://svn.apache.org/viewcvs/jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java?view=diff&rev=106845&p1=jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java&r1=106844&p2=jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java&r2=106845
==============================================================================
--- jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java	(original)
+++ jakarta/velocity/trunk/src/java/org/apache/velocity/util/EnumerationIterator.java	Sun Nov 28 12:46:06 2004
@@ -23,14 +23,14 @@
  * An Iterator wrapper for an Enumeration.
  *
  * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
- * @version $Id: EnumerationIterator.java,v 1.3 2004/03/19 17:13:40 dlr Exp $
+ * @version $Id$
  */
 public class EnumerationIterator implements Iterator
 {
     /**
      * The enumeration to iterate.
      */
-    private Enumeration enum = null;
+    private Enumeration enumeration = null;
 
     /**
      * Creates a new iteratorwrapper instance for the specified 
@@ -38,9 +38,9 @@
      *
      * @param enum  The Enumeration to wrap.
      */
-    public EnumerationIterator( Enumeration enum)
+    public EnumerationIterator(Enumeration enumeration)
     {
-        this.enum = enum;
+        this.enumeration = enumeration;
     }
 
     /**
@@ -50,7 +50,7 @@
      */
     public Object next()
     {
-        return enum.nextElement();
+        return enumeration.nextElement();
     }
     
     /**
@@ -60,7 +60,7 @@
      */
     public boolean hasNext()
     {
-        return enum.hasMoreElements();
+        return enumeration.hasMoreElements();
     }
 
     /**

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