File: 07_fix_javac_crash.diff

package info (click to toggle)
libgroboutils-java 5-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,396 kB
  • ctags: 11,186
  • sloc: java: 59,748; xml: 12,762; sh: 377; perl: 104; makefile: 20
file content (98 lines) | stat: -rw-r--r-- 3,799 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Description: Work around a compiler crash caused by the use of 'enum' identifiers
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
Bug-Debian: https://bugs.debian.org/738399
--- a/testing-junit/sources/dev/net/sourceforge/groboutils/junit/v1/iftc/InterfaceTestSuite.java
+++ b/testing-junit/sources/dev/net/sourceforge/groboutils/junit/v1/iftc/InterfaceTestSuite.java
@@ -198,10 +198,10 @@
                 }
                 else
                 {
-                    Enumeration enum = t.classes.elements();
-                    while (enum.hasMoreElements())
+                    Enumeration e = t.classes.elements();
+                    while (e.hasMoreElements())
                     {
-                        addTestSuite( (Class)enum.nextElement() );
+                        addTestSuite( (Class)e.nextElement() );
                     }
                 }
             }
@@ -293,10 +293,10 @@
         
         ITestCreator tc = createTestCreator( this.creators );
         TestClassCreator tcc = new TestClassCreator( tc );
-        for (Enumeration enum = this.classes.elements();
-            enum.hasMoreElements();)
+        for (Enumeration e = this.classes.elements();
+            e.hasMoreElements();)
         {
-            Class c = (Class)enum.nextElement();
+            Class c = (Class)e.nextElement();
             loadTestSuite( c, tcc );
         }
         
--- a/testing-autodoc/sources/dev/net/sourceforge/groboutils/autodoc/v1/junit/AutoDocJUnitListener.java
+++ b/testing-autodoc/sources/dev/net/sourceforge/groboutils/autodoc/v1/junit/AutoDocJUnitListener.java
@@ -131,9 +131,9 @@
      */
     public void addError(Test test, Throwable t)
     {
-        for (Enumeration enum = getListeners(); enum.hasMoreElements();)
+        for (Enumeration e = getListeners(); e.hasMoreElements();)
         {
-            TestListener tl = (TestListener)enum.nextElement();
+            TestListener tl = (TestListener)e.nextElement();
             tl.addError( test, t );
         }
     }
@@ -143,9 +143,9 @@
      */
     public void addFailure(Test test, AssertionFailedError t)
     {
-        for (Enumeration enum = getListeners(); enum.hasMoreElements();)
+        for (Enumeration e = getListeners(); e.hasMoreElements();)
         {
-            TestListener tl = (TestListener)enum.nextElement();
+            TestListener tl = (TestListener)e.nextElement();
             tl.addFailure( test, t );
         }
     }
@@ -156,9 +156,9 @@
      */
     public void endTest(Test test)
     {
-        for (Enumeration enum = getListeners(); enum.hasMoreElements();)
+        for (Enumeration e = getListeners(); e.hasMoreElements();)
         {
-            TestListener tl = (TestListener)enum.nextElement();
+            TestListener tl = (TestListener)e.nextElement();
             tl.endTest( test );
         }
     }
@@ -169,9 +169,9 @@
      */
     public void startTest(Test test)
     {
-        for (Enumeration enum = getListeners(); enum.hasMoreElements();)
+        for (Enumeration e = getListeners(); e.hasMoreElements();)
         {
-            TestListener tl = (TestListener)enum.nextElement();
+            TestListener tl = (TestListener)e.nextElement();
             tl.startTest( test );
         }
     }
@@ -218,10 +218,10 @@
     protected static TestListenerFactory[] getFactories()
     {
         Vector v = new Vector();
-        Enumeration enum = getFactoryStore().getSingletons();
-        while (enum.hasMoreElements())
+        Enumeration e = getFactoryStore().getSingletons();
+        while (e.hasMoreElements())
         {
-            v.addElement( enum.nextElement() );
+            v.addElement( e.nextElement() );
         }
         
         TestListenerFactory[] tlf = new TestListenerFactory[ v.size() ];