Hello,

I wanted to make some Java 5 specific changes to ECS 1.4.2, but noticed
it didn't compile with Java 5 out of the tarball.  I was able to build
after applying the changes in the attached patch, and it should still
build with Java 1.4.

Leo

diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/ConcreteElement.java ecs-1.4.2.new/src/java/org/apache/ecs/ConcreteElement.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/ConcreteElement.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/ConcreteElement.java	2007-09-04 19:55:11.000000000 -0600
@@ -319,11 +319,11 @@
                 if(ce.getTagText() != null)
                     out.write(ce.getTagText().getBytes(encoding));
 
-                Enumeration enum = ce.registryList.elements();
+                Enumeration enum_ = ce.registryList.elements();
 
-                while(enum.hasMoreElements())
+                while(enum_.hasMoreElements())
                 {
-                    Object obj = ce.registry.get((String)enum.nextElement());
+                    Object obj = ce.registry.get((String)enum_.nextElement());
                     if(obj instanceof GenericElement)
                     {
                         Element e = (Element)obj;
@@ -435,10 +435,10 @@
             if(getTagText() != null)
                 out.write(getTagText());
 
-            Enumeration enum = registryList.elements();
-			while(enum.hasMoreElements())
+            Enumeration enum_ = registryList.elements();
+			while(enum_.hasMoreElements())
 			{
-				Object obj = registry.get((String)enum.nextElement());
+				Object obj = registry.get((String)enum_.nextElement());
 				if(obj instanceof GenericElement)
 				{
 					Element e = (Element)obj;
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/ElementAttributes.java ecs-1.4.2.new/src/java/org/apache/ecs/ElementAttributes.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/ElementAttributes.java	2007-09-04 19:55:00.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/ElementAttributes.java	2007-09-04 19:55:11.000000000 -0600
@@ -342,12 +342,12 @@
         }
         out.append(getElementType());
 
-        Enumeration enum = getElementHashEntry().keys();
+        Enumeration enum_ = getElementHashEntry().keys();
         String value = null; // avoid creating a new string object on each pass through the loop
 
-        while (enum.hasMoreElements())
+        while (enum_.hasMoreElements())
         {
-            String attr = (String) enum.nextElement();
+            String attr = (String) enum_.nextElement();
             if(getAttributeFilterState())
             {
                 value = getAttributeFilter().process(getElementHashEntry().get(attr).toString());
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/filter/RegexpFilter.java ecs-1.4.2.new/src/java/org/apache/ecs/filter/RegexpFilter.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/filter/RegexpFilter.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/filter/RegexpFilter.java	2007-09-04 19:55:11.000000000 -0600
@@ -118,10 +118,10 @@
         }
         
         String substituteIn = to_process;
-        Enumeration enum = keys();
+        Enumeration enum_ = keys();
 
-        while (enum.hasMoreElements()) {
-            RE r = (RE)enum.nextElement();
+        while (enum_.hasMoreElements()) {
+            RE r = (RE)enum_.nextElement();
             String substitution = (String)get(r);
             substituteIn = r.subst(substituteIn, substitution);
         }
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/html/A.java ecs-1.4.2.new/src/java/org/apache/ecs/html/A.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/html/A.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/html/A.java	2007-09-04 19:55:11.000000000 -0600
@@ -462,13 +462,13 @@
     */
     public boolean getNeedLineBreak()
     {
-        java.util.Enumeration enum = elements();
+        java.util.Enumeration enum_ = elements();
         int i=0;
         int j=0;
-        while(enum.hasMoreElements())
+        while(enum_.hasMoreElements())
         {
             j++;
-            Object obj = enum.nextElement();
+            Object obj = enum_.nextElement();
             if( obj instanceof IMG )
                 i++;
         }
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/html/Select.java ecs-1.4.2.new/src/java/org/apache/ecs/html/Select.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/html/Select.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/html/Select.java	2007-09-04 19:55:11.000000000 -0600
@@ -219,10 +219,10 @@
 
     public Select selectOption(int option)
     {
-        Enumeration enum = keys();
-        for(int x = 0; enum.hasMoreElements(); x++)
+        Enumeration enum_ = keys();
+        for(int x = 0; enum_.hasMoreElements(); x++)
         {
-            ConcreteElement element = (ConcreteElement)getElement((String)enum.nextElement());
+            ConcreteElement element = (ConcreteElement)getElement((String)enum_.nextElement());
             if(x == option)
             {
                 ((Option)element).setSelected(true);
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/html/TD.java ecs-1.4.2.new/src/java/org/apache/ecs/html/TD.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/html/TD.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/html/TD.java	2007-09-04 19:55:11.000000000 -0600
@@ -468,13 +468,13 @@
     */
     public boolean getNeedLineBreak()
     {
-        java.util.Enumeration enum = elements();
+        java.util.Enumeration enum_ = elements();
         int i=0;
         int j=0;
-        while(enum.hasMoreElements())
+        while(enum_.hasMoreElements())
         {
             j++;
-            Object obj = enum.nextElement();
+            Object obj = enum_.nextElement();
             if( obj instanceof IMG || obj instanceof A )
                 i++;
         }
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/vxml/TestBed2.java ecs-1.4.2.new/src/java/org/apache/ecs/vxml/TestBed2.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/vxml/TestBed2.java	2007-09-04 19:55:00.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/vxml/TestBed2.java	2007-09-04 19:55:11.000000000 -0600
@@ -158,12 +158,12 @@
 	
 	Menu menu3 = new Menu("true");
 	Prompt prompt2 = new Prompt("Welcome Home");
-	Enumerate enum = new Enumerate();
-	enum.addElement("For ");
-	enum.addElement(new Value("_prompt"));
-	enum.addElement(", press ");
-	enum.addElement(new Value("_dtmf"));
-	prompt2.addElement(enum);
+	Enumerate enum_ = new Enumerate();
+	enum_.addElement("For ");
+	enum_.addElement(new Value("_prompt"));
+	enum_.addElement(", press ");
+	enum_.addElement(new Value("_dtmf"));
+	prompt2.addElement(enum_);
 	menu3.addElement(prompt2);
 	Choice choice1 = new Choice("http://www.sports.example/vxml/start.vxml";);
 	Choice choice2 = new Choice("http://www.weather.example/intro.vxml";);
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/xhtml/a.java ecs-1.4.2.new/src/java/org/apache/ecs/xhtml/a.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/xhtml/a.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/xhtml/a.java	2007-09-04 19:55:11.000000000 -0600
@@ -472,13 +472,13 @@
     */
     public boolean getNeedLineBreak()
     {
-        java.util.Enumeration enum = elements();
+        java.util.Enumeration enum_ = elements();
         int i=0;
         int j=0;
-        while(enum.hasMoreElements())
+        while(enum_.hasMoreElements())
         {
             j++;
-            Object obj = enum.nextElement();
+            Object obj = enum_.nextElement();
             if( obj instanceof img )
                 i++;
         }
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/xhtml/td.java ecs-1.4.2.new/src/java/org/apache/ecs/xhtml/td.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/xhtml/td.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/xhtml/td.java	2007-09-04 19:55:11.000000000 -0600
@@ -466,13 +466,13 @@
     */
     public boolean getNeedLineBreak()
     {
-        java.util.Enumeration enum = elements();
+        java.util.Enumeration enum_ = elements();
         int i=0;
         int j=0;
-        while(enum.hasMoreElements())
+        while(enum_.hasMoreElements())
         {
             j++;
-            Object obj = enum.nextElement();
+            Object obj = enum_.nextElement();
             if( obj instanceof img || obj instanceof a )
                 i++;
         }
diff -urN ecs-1.4.2-src/src/java/org/apache/ecs/xml/XML.java ecs-1.4.2.new/src/java/org/apache/ecs/xml/XML.java
--- ecs-1.4.2-src/src/java/org/apache/ecs/xml/XML.java	2007-09-04 19:55:01.000000000 -0600
+++ ecs-1.4.2.new/src/java/org/apache/ecs/xml/XML.java	2007-09-04 19:55:11.000000000 -0600
@@ -193,13 +193,13 @@
     public boolean getNeedLineBreak() {
         boolean linebreak = true;
 
-        java.util.Enumeration enum = elements();
+        java.util.Enumeration enum_ = elements();
 
         // if this tag has one child, and it's a String, then don't
         // do any linebreaks to preserve whitespace
 
-        while (enum.hasMoreElements()) {
-            Object obj = enum.nextElement();
+        while (enum_.hasMoreElements()) {
+            Object obj = enum_.nextElement();
             if (obj instanceof StringElement) {
                  linebreak = false;
                  break;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to