Bug#673765: dom4j FTBFS with openjdk-7

James Page james.page at ubuntu.com
Mon May 21 09:56:06 UTC 2012


Package: dom4j
Version: 1.6.1+dfsg.2-5
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch openjdk-7-transition

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS with openjdk-7 (LP: #888121):
    - d/patches/java7-compat.patch: Fix compareTo function in Rule class
      to ensure that comparisions are actually symmetric.

I suspect that the way the Collections.sort() function works has changed in
Java 7 - basically dom4j Rule comparision was a bit broken in that

    r1 > r2 = 1

but

    r2 < r1 = 0 (should be -1)

This causes Java 7 to leave the arraylist intact rather than sorting it.

This patch works with both Java6 and Java7.

Thanks for considering the patch.


- -- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-24-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJPuhE2AAoJEL/srsug59jDABQQAKyuELfulLsZ22ObDbnWkeRd
mkKqWZLp/dbbximTyx4lqaEa4ZzMgp6WvMzAqRSWyIJXv4C7lb7qlPuo+stBGuKk
HT8VEleWgf68ode2Ss4ATkrbuRU8CavvrO4BDAY4E50cL0pTUiPm8AZSh/POe7os
odqscXIpoqV2AIhJq01kQm6z+X/Fq2VawqGLfPmVGmCLLO7G5vB9SKCs3ADop8kB
Od7P2qegd9plGFLhgDtLkf9ldhUOc1esckmgfkfYuaVOEGvqwV3tkv4tvJqXnYCq
1wYEvL6qOcKa/+6cL6njsynHrbn2Mg7gUHD0La4mbwrazIeJJrw8XLKOEOLV9kmy
SwugP7z7CRcEgQJidjEuhL95xlNrX80/ebgtj7rm3rWbiaTtIwU/DzZntmr94y/6
fWI261CcN3IuFi5TEJsSjcrSC3ofOcNcIWgD92ppJpXpimjuVcmi29YxWWnT3tjj
HfMMncEEbWz5ZvwdVwGS2WSmB2vNWyBLUT4oVGav752xQMQfcDNSWkGTTbzozr+O
kJ4v5UNcJgDqtDiq3GoPOGXxwXQlNBHTr0KBQmRFsnWGWFX7O+5DsMMIZ0BE+Jof
BgD4r6jqUYghvumkYxkCSVwI+bELd1UgY+rCjbL36904KWQutG9KJiqG60Cszr8A
1t3aGn6Se+bG8pC3JYp5
=IIzc
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dom4j_1.6.1+dfsg.2-5ubuntu1.debdiff
Type: text/x-diff
Size: 33700 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20120521/27fbc697/attachment-0001.diff>


More information about the pkg-java-maintainers mailing list