[libxpp2-java] 18/20: Fixed the build failure with Java 9

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Sat Oct 14 20:56:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository libxpp2-java.

commit d7fdf4d469c6a70de3845b3156774cb9d7d02f76
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Sat Oct 14 22:34:21 2017 +0200

    Fixed the build failure with Java 9
---
 debian/changelog                              |  1 +
 debian/patches/0002-java9-compatibility.patch | 50 +++++++++++++++++++++++++++
 debian/patches/series                         |  1 +
 3 files changed, 52 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f366100..d807f29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 libxpp2-java (2.1.10-8) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Fixed the build failure with Java 9
   * Removed Michael Koch from the uploaders (Closes: #654105)
   * No longer install the javadoc in the library package
   * Build with the DH sequencer instead of CDBS
diff --git a/debian/patches/0002-java9-compatibility.patch b/debian/patches/0002-java9-compatibility.patch
new file mode 100644
index 0000000..3d13498
--- /dev/null
+++ b/debian/patches/0002-java9-compatibility.patch
@@ -0,0 +1,50 @@
+Description: Fixes the build failure with Java 9
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/java/impl/node/org/gjt/xpp/impl/node/Node.java
++++ b/src/java/impl/node/org/gjt/xpp/impl/node/Node.java
+@@ -273,9 +273,9 @@
+         oneChild = null;
+ 
+         if(children != null && children.size() > 0) {
+-            Enumeration enum = children.elements();
+-            while (enum.hasMoreElements()) {
+-                Object child = enum.nextElement();
++            Enumeration enumeration = children.elements();
++            while (enumeration.hasMoreElements()) {
++                Object child = enumeration.nextElement();
+                 if(child instanceof XmlNode) {
+                     ((XmlNode)child).setParentNode(null);
+                 }
+--- a/src/java/tests/node/NodeTest.java
++++ b/src/java/tests/node/NodeTest.java
+@@ -386,20 +386,20 @@
+         assertEquals("", t1.getDefaultNamespaceUri());
+ 
+         // check enumeration stuff...
+-        Enumeration enum = t1.children();
++        Enumeration enumeration = t1.children();
+         assertEquals(0, t1.getChildrenCountSoFar());
+         //child1, child2...
+-        assertTrue(enum.hasMoreElements());
+-        child1 = (XmlPullNode) enum.nextElement();
++        assertTrue(enumeration.hasMoreElements());
++        child1 = (XmlPullNode) enumeration.nextElement();
+         assertEquals("child1", child1.getLocalName());
+-        assertNotNull(enum.nextElement());
+-        child3 = (XmlPullNode) enum.nextElement();
++        assertNotNull(enumeration.nextElement());
++        child3 = (XmlPullNode) enumeration.nextElement();
+         assertEquals("child3", child3.getLocalName());
+-        assertNotNull(enum.nextElement());
++        assertNotNull(enumeration.nextElement());
+         assertEquals(4, t1.getChildrenCountSoFar());
+-        assertEquals(true, enum.hasMoreElements());
+-        assertNotNull(enum.nextElement());
+-        assertEquals(false, enum.hasMoreElements());
++        assertEquals(true, enumeration.hasMoreElements());
++        assertNotNull(enumeration.nextElement());
++        assertEquals(false, enumeration.hasMoreElements());
+ 
+         XmlPullNode t2 = (XmlPullNode) node.getChildAt(1);
+         assertEquals("t2", t2.getLocalName());
diff --git a/debian/patches/series b/debian/patches/series
index 605542f..0e29588 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-update-Java-version-to-1.2.patch
+0002-java9-compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libxpp2-java.git



More information about the pkg-java-commits mailing list