[dom4j] 62/74: Fixed the compatibility with the version of xpp2 in Debian

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Oct 25 10:34:21 UTC 2017


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

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

commit 64c9281063e454587ca231650676aa5dc50397e9
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Oct 25 09:17:14 2017 +0200

    Fixed the compatibility with the version of xpp2 in Debian
---
 debian/changelog                           |  1 +
 debian/control                             |  4 +--
 debian/patches/07_xpp2-compatibility.patch | 47 ++++++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 4 files changed, 51 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5b6272f..9ca3215 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ dom4j (2.1.0-1) UNRELEASED; urgency=medium
 
   * New upstream release
     - Build with Gradle instead of Ant
+    - Fixed the compatibility with the version of xpp2 in Debian
   * Moved the package to Git
   * Switch to debhelper level 10
   * Standards-Version updated to 4.1.1
diff --git a/debian/control b/debian/control
index 752ecb4..01220ea 100644
--- a/debian/control
+++ b/debian/control
@@ -17,7 +17,7 @@ Build-Depends:
  librelaxng-datatype-java,
  libxalan2-java (>= 2.7.0),
  libxerces2-java,
- libxpp2-java,
+ libxpp2-java (>= 2.1.10-8~),
  libxpp3-java,
  maven-repo-helper
 Standards-Version: 4.1.1
@@ -30,7 +30,7 @@ Architecture: all
 Depends:
  libjaxen-java,
  libmsv-java,
- libxpp2-java,
+ libxpp2-java (>= 2.1.10-8~),
  libxpp3-java,
  ${misc:Depends}
 Suggests: libdom4j-java-doc
diff --git a/debian/patches/07_xpp2-compatibility.patch b/debian/patches/07_xpp2-compatibility.patch
new file mode 100644
index 0000000..68dce92
--- /dev/null
+++ b/debian/patches/07_xpp2-compatibility.patch
@@ -0,0 +1,47 @@
+Description: Fixes the compatibility with the version of xpp2 in Debian
+Origin: backport, https://github.com/dom4j/dom4j/pull/22/files
+--- a/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java
++++ b/src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java
+@@ -211,7 +211,7 @@
+      * @throws XmlPullParserException
+      *             DOCUMENT ME!
+      */
+-    public void removeAtttributes() throws XmlPullParserException {
++    public void removeAttributes() throws XmlPullParserException {
+         if (element != null) {
+             element.setAttributes(new ArrayList());
+ 
+@@ -221,6 +221,33 @@
+         }
+     }
+ 
++    public boolean removeAttributeByName(String namespaceURI, String localName) throws XmlPullParserException {
++        if (element != null) {
++            for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) {
++                Attribute attribute = iter.next();
++
++                if (namespaceURI.equals(attribute.getNamespaceURI())
++                        && localName.equals(attribute.getName())) {
++                    return element.remove(attribute);
++                }
++            }
++        }
++        return false;
++    }
++
++    public boolean removeAttributeByRawName(String rawName) throws XmlPullParserException {
++        if (element != null) {
++            for (Iterator<Attribute> iter = element.attributeIterator(); iter.hasNext();) {
++                Attribute attribute = iter.next();
++
++                if (rawName.equals(attribute.getQualifiedName())) {
++                    return element.remove(attribute);
++                }
++            }
++        }
++        return false;
++    }
++
+     public String getLocalName() {
+         return element.getName();
+     }
diff --git a/debian/patches/series b/debian/patches/series
index e65b47b..a42369b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 04_headless-test.patch
+07_xpp2-compatibility.patch

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



More information about the pkg-java-commits mailing list