diff --git a/xpp2-build_xml.patch b/xpp2-build_xml.patch
index 4eaaa7f..0953ca8 100644
--- a/xpp2-build_xml.patch
+++ b/xpp2-build_xml.patch
@@ -5,8 +5,8 @@
-
-+
-+
++
++
@@ -185,7 +185,7 @@
0) {
+- Enumeration enum = children.elements();
+- while (enum.hasMoreElements()) {
+- Object child = enum.nextElement();
++ Enumeration emun = children.elements();
++ while (emun.hasMoreElements()) {
++ Object child = emun.nextElement();
+ if(child instanceof XmlNode) {
+ ((XmlNode)child).setParentNode(null);
+ }
+@@ -373,11 +373,11 @@
+ if(declaredNs != null) {
+ System.arraycopy(declaredNs, 0, uris, off, len);
+ }
+- // Enumeration enum = prefix2Ns.keys();
++ // Enumeration emun = prefix2Ns.keys();
+ // int i = off;
+- // while (enum.hasMoreElements() && i < off + len)
++ // while (emun.hasMoreElements() && i < off + len)
+ // {
+- // uris[i++] = (String) prefix2Ns.get( enum.nextElement() );
++ // uris[i++] = (String) prefix2Ns.get( emun.nextElement() );
+ // }
+ }
+
+@@ -512,10 +512,10 @@
+ buf.append(declaredNs[i]);
+ buf.append("'");
+ }
+- // Enumeration enum = prefix2Ns.keys();
+- // while (enum.hasMoreElements())
++ // Enumeration emun = prefix2Ns.keys();
++ // while (emun.hasMoreElements())
+ // {
+- // Object key = enum.nextElement();
++ // Object key = emun.nextElement();
+ // buf.append("xmlns:");
+ // buf.append(key);
+ // buf.append("='");
+--- PullParser2.1.10/src/java/tests/node/NodeTest.java 2017-09-11 18:39:27.109544537 +0200
++++ PullParser2.1.10/src/java/tests/node/NodeTest.java 2017-09-11 18:43:53.211362957 +0200
+@@ -386,20 +386,20 @@
+ assertEquals("", t1.getDefaultNamespaceUri());
+
+ // check enumeration stuff...
+- Enumeration enum = t1.children();
++ Enumeration emun = t1.children();
+ assertEquals(0, t1.getChildrenCountSoFar());
+ //child1, child2...
+- assertTrue(enum.hasMoreElements());
+- child1 = (XmlPullNode) enum.nextElement();
++ assertTrue(emun.hasMoreElements());
++ child1 = (XmlPullNode) emun.nextElement();
+ assertEquals("child1", child1.getLocalName());
+- assertNotNull(enum.nextElement());
+- child3 = (XmlPullNode) enum.nextElement();
++ assertNotNull(emun.nextElement());
++ child3 = (XmlPullNode) emun.nextElement();
+ assertEquals("child3", child3.getLocalName());
+- assertNotNull(enum.nextElement());
++ assertNotNull(emun.nextElement());
+ assertEquals(4, t1.getChildrenCountSoFar());
+- assertEquals(true, enum.hasMoreElements());
+- assertNotNull(enum.nextElement());
+- assertEquals(false, enum.hasMoreElements());
++ assertEquals(true, emun.hasMoreElements());
++ assertNotNull(emun.nextElement());
++ assertEquals(false, emun.hasMoreElements());
+
+ XmlPullNode t2 = (XmlPullNode) node.getChildAt(1);
+ assertEquals("t2", t2.getLocalName());
diff --git a/xpp2.changes b/xpp2.changes
index ccc76fe..294f232 100644
--- a/xpp2.changes
+++ b/xpp2.changes
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Mon Sep 11 16:45:34 UTC 2017 - fstrba@suse.com
+
+- Modified patch:
+ * xpp2-build_xml.patch
+ + Specify java source and target level 1.6 in order to allow
+ building with jdk9
+ * xpp2-enum.patch
+ + Rename variables "enum" to "emun" in order to avoid clash
+ with a reserved word in java >= 1.5
+
-------------------------------------------------------------------
Fri Jul 11 13:59:37 UTC 2014 - tchvatal@suse.com
diff --git a/xpp2.spec b/xpp2.spec
index 842e991..83850e1 100644
--- a/xpp2.spec
+++ b/xpp2.spec
@@ -1,7 +1,7 @@
#
# spec file for package xpp2
#
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@ Group: Development/Libraries/Java
Url: http://www.extreme.indiana.edu/xgws/xsoap/xpp/
Source0: http://www.extreme.indiana.edu/xgws/xsoap/xpp/download/PullParser2/PullParser2.1.10.tar.bz2
Patch0: xpp2-build_xml.patch
+Patch1: xpp2-enum.patch
BuildRequires: ant >= 1.6
BuildRequires: ant-junit >= 1.6
BuildRequires: fdupes
@@ -74,6 +75,7 @@ active development concentrates on its successor XPP3/MXP1
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
%patch0 -b .sav
+%patch1 -p1
%build
export OPT_JAR_LIST="ant/ant-junit junit"