From 19fe6f8abd8cb192672444bec2be0e1818bd9b4f696b47447729db4acc8ca51e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 15 May 2018 07:44:05 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-collections?expand=0&rev=23 --- apache-commons-collections.changes | 7 +++++++ apache-commons-collections.spec | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apache-commons-collections.changes b/apache-commons-collections.changes index 6781cca..4d718ff 100644 --- a/apache-commons-collections.changes +++ b/apache-commons-collections.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 15 07:37:07 UTC 2018 - fstrba@suse.com + +- Build with source and target 8 to prepare for a possible removal + of 1.6 compatibility in OpenJDK 11 +- Run fdupes on documentation + ------------------------------------------------------------------- Fri Sep 29 08:12:33 UTC 2017 - fstrba@suse.com diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 47db09e..cb0dc34 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -1,7 +1,7 @@ # # spec file for package apache-commons-collections # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -37,7 +37,8 @@ Patch4: commons-collections-3.2.2-tf.javadoc.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: apache-commons-parent -BuildRequires: java-devel +BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local BuildRequires: javapackages-tools BuildRequires: junit @@ -108,8 +109,8 @@ sed -i 's/@VERSION@/%{version}/' pom-testframework.xml %build echo "junit.jar=$(build-classpath junit)" >>build.properties ant \ - -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 \ - -Dant.build.javadoc.source=1.6 \ + -Dant.build.javac.source=8 -Dant.build.javac.target=8 \ + -Dant.build.javadoc.source=8 \ -Djava.io.tmpdir=. jar javadoc tf.validate tf.jar dist.bin dist.src tf.javadoc %install @@ -128,10 +129,12 @@ install -Dpm 644 pom-testframework.xml %{buildroot}%{_mavenpomdir}/JPP-%{short_n # javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{name} cp -pr build/docs/apidocs/* %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir}/%{name} # testframework-javadoc install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-testframework cp -pr build/docs/testframework/* %{buildroot}%{_javadocdir}/%{name}-testframework +%fdupes -s %{buildroot}%{_javadocdir}/%{name}-testframework %files %defattr(0644,root,root,0755) From 45ce47709a546fd30e6aa501e3f739ea820f1e9a0c450c08aef7db380683f18f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 17 May 2018 19:56:59 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-collections?expand=0&rev=24 --- apache-commons-collections.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache-commons-collections.changes b/apache-commons-collections.changes index 4d718ff..c409089 100644 --- a/apache-commons-collections.changes +++ b/apache-commons-collections.changes @@ -2,7 +2,7 @@ Tue May 15 07:37:07 UTC 2018 - fstrba@suse.com - Build with source and target 8 to prepare for a possible removal - of 1.6 compatibility in OpenJDK 11 + of 1.6 compatibility - Run fdupes on documentation ------------------------------------------------------------------- From 21bcc33b0b9548f7de4252e8d70f476a8ad505248fb2e35a0ec841dff589f998 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 10 Jul 2018 13:04:27 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-collections?expand=0&rev=25 --- apache-commons-collections.changes | 8 ++++++++ apache-commons-collections.spec | 2 ++ commons-collections-jdk11.patch | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 commons-collections-jdk11.patch diff --git a/apache-commons-collections.changes b/apache-commons-collections.changes index c409089..21fc4ce 100644 --- a/apache-commons-collections.changes +++ b/apache-commons-collections.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 10 13:02:58 UTC 2018 - fstrba@suse.com + +- Added patch: + * commons-collections-jdk11.patch + + resolve ambiguity with toArray(null) + + fixes tests with jdk11 + ------------------------------------------------------------------- Tue May 15 07:37:07 UTC 2018 - fstrba@suse.com diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index cb0dc34..52c02ae 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -34,6 +34,7 @@ Patch2: java8-compat.patch # PATCH-FIX-UPSTREAM add missing MANIFEST.MF file Patch3: commons-collections-missing-MF.patch Patch4: commons-collections-3.2.2-tf.javadoc.patch +Patch5: commons-collections-jdk11.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: apache-commons-parent @@ -101,6 +102,7 @@ find . -name "*.class" -exec rm -f {} \; %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # Substitute version into testframework pom cp -p %{SOURCE1} pom-testframework.xml diff --git a/commons-collections-jdk11.patch b/commons-collections-jdk11.patch new file mode 100644 index 0000000..660235b --- /dev/null +++ b/commons-collections-jdk11.patch @@ -0,0 +1,11 @@ +--- commons-collections-3.2.2-src/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java 2015-11-12 23:25:16.000000000 +0100 ++++ commons-collections-3.2.2-src/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java 2018-07-10 14:58:06.116528850 +0200 +@@ -1116,7 +1116,7 @@ + verify(); + + try { +- array = collection.toArray(null); ++ array = collection.toArray((Object[])null); + fail("toArray(null) should raise NPE"); + } catch (NullPointerException e) { + // expected