File: 01-java9-compatibility.patch

package info (click to toggle)
squareness 2.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660 kB
  • sloc: java: 5,594; xml: 55; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 2,042 bytes parent folder | download | duplicates (3)
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
Description: Fixes the compatibility issues with Java 9
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/source/org/jvnet/lafplugin/XMLElement.java
+++ b/source/org/jvnet/lafplugin/XMLElement.java
@@ -478,9 +478,9 @@
         this.children = new Vector();
         this.entities = entities;
         this.lineNr = 0;
-        Enumeration enum = this.entities.keys();
-        while (enum.hasMoreElements()) {
-            Object key = enum.nextElement();
+        Enumeration enumeration = this.entities.keys();
+        while (enumeration.hasMoreElements()) {
+            Object key = enumeration.nextElement();
             Object value = this.entities.get(key);
             if (value instanceof String) {
                 value = ((String) value).toCharArray();
@@ -2168,10 +2168,10 @@
         writer.write('<');
         writer.write(this.name);
         if (! this.attributes.isEmpty()) {
-            Enumeration enum = this.attributes.keys();
-            while (enum.hasMoreElements()) {
+            Enumeration enumeration = this.attributes.keys();
+            while (enumeration.hasMoreElements()) {
                 writer.write(' ');
-                String key = (String) enum.nextElement();
+                String key = (String) enumeration.nextElement();
                 String value = (String) this.attributes.get(key);
                 writer.write(key);
                 writer.write('='); writer.write('"');
@@ -2189,9 +2189,9 @@
             writer.write('/'); writer.write('>');
         } else {
             writer.write('>');
-            Enumeration enum = this.enumerateChildren();
-            while (enum.hasMoreElements()) {
-                XMLElement child = (XMLElement) enum.nextElement();
+            Enumeration enumeration = this.enumerateChildren();
+            while (enumeration.hasMoreElements()) {
+                XMLElement child = (XMLElement) enumeration.nextElement();
                 child.write(writer);
             }
             writer.write('<'); writer.write('/');