make JDOM sort methods public

This commit is contained in:
gil 2014-04-05 01:23:08 +02:00
parent 2573beaa94
commit 8c50ab9836
2 changed files with 37 additions and 2 deletions

33
jdom-2.0.5-java8.patch Normal file
View File

@ -0,0 +1,33 @@
diff -Nru jdom-JDOM-2.0.5/core/src/java/org/jdom2/AttributeList.java jdom-JDOM-2.0.5-gil/core/src/java/org/jdom2/AttributeList.java
--- jdom-JDOM-2.0.5/core/src/java/org/jdom2/AttributeList.java 2013-04-17 00:00:39.000000000 +0200
+++ jdom-JDOM-2.0.5-gil/core/src/java/org/jdom2/AttributeList.java 2014-04-05 01:16:17.473795389 +0200
@@ -606,7 +606,7 @@
*
* @param comp The Comparator to use for sorting.
*/
- void sort(Comparator<? super Attribute> comp) {
+ public void sort(Comparator<? super Attribute> comp) {
final int sz = size;
int[] indexes = new int[sz];
for (int i = 0 ; i < sz; i++) {
diff -Nru jdom-JDOM-2.0.5/core/src/java/org/jdom2/ContentList.java jdom-JDOM-2.0.5-gil/core/src/java/org/jdom2/ContentList.java
--- jdom-JDOM-2.0.5/core/src/java/org/jdom2/ContentList.java 2013-04-17 00:00:39.000000000 +0200
+++ jdom-JDOM-2.0.5-gil/core/src/java/org/jdom2/ContentList.java 2014-04-05 01:17:24.004508188 +0200
@@ -628,7 +628,7 @@
return left;
}
- final void sort(final Comparator<? super Content> comp) {
+ public final void sort(final Comparator<? super Content> comp) {
final int sz = size;
int[] indexes = new int[sz];
for (int i = 0 ; i < sz; i++) {
@@ -1238,7 +1238,7 @@
}
- final void sort(final Comparator<? super F> comp) {
+ public final void sort(final Comparator<? super F> comp) {
// this size() forces a full scan/update of the list.
final int sz = size();
final int[] indexes = new int[sz];

View File

@ -12,6 +12,9 @@ Source2: jdom-junit-template.pom
# Disable gpg signatures
# Process contrib and junit pom files
Patch0: jdom-2.0.5-build.patch
# Resolve conflict with java8
# make JDOM sort methods public
Patch1: jdom-2.0.5-java8.patch
BuildRequires: java-devel
BuildRequires: java-javadoc
@ -62,14 +65,13 @@ find . -name "*.jar" -print -delete
%patch0 -p0
sed -i "s|%{_javadir}/objectweb-asm|%{_javadir}/objectweb-asm3|" build.xml
%patch1 -p1
cp -p %{SOURCE1} maven/contrib.pom
cp -p %{SOURCE2} maven/junit.pom
sed -i 's/\r//' LICENSE.txt README.txt
sed -i "s|final void sort(final Comparator<? super Content> comp) {|public final void sort(final Comparator<? super Content> comp) {|" core/src/java/org/jdom2/ContentList.java
%build
ant -Dversion=%{version} -Dj2se.apidoc=%{_javadocdir}/java maven