diff --git a/SOURCES/junit-ignore-bridge-methods.patch b/SOURCES/junit-ignore-bridge-methods.patch new file mode 100644 index 0000000..c54cdf8 --- /dev/null +++ b/SOURCES/junit-ignore-bridge-methods.patch @@ -0,0 +1,24 @@ +From 80542f2c5d3d52812405829d8e1c5b0a0acc3e7e Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Tue, 1 Dec 2015 11:21:07 +0100 +Subject: [PATCH] Ignore bridge methods + +--- + src/main/java/org/junit/runners/model/TestClass.java | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/main/java/org/junit/runners/model/TestClass.java b/src/main/java/org/junit/runners/model/TestClass.java +index 93209ea..baca84d 100644 +--- a/src/main/java/org/junit/runners/model/TestClass.java ++++ b/src/main/java/org/junit/runners/model/TestClass.java +@@ -43,6 +43,7 @@ public class TestClass { + + for (Class eachClass : getSuperClasses(fClass)) { + for (Method eachMethod : MethodSorter.getDeclaredMethods(eachClass)) { ++ if (!eachMethod.isBridge()) + addToAnnotationLists(new FrameworkMethod(eachMethod), + fMethodsForAnnotations); + } +-- +2.5.0 + diff --git a/SPECS/junit.spec b/SPECS/junit.spec index 23ee40b..3e3e795 100644 --- a/SPECS/junit.spec +++ b/SPECS/junit.spec @@ -34,7 +34,7 @@ Name: %{?scl_prefix}%{pkg_name} Version: 4.11 -Release: 8.15%{?dist} +Release: 8.16%{?dist} Epoch: 0 Summary: Java regression test package License: CPL @@ -48,6 +48,7 @@ Source3: create-tarball.sh # Removing hamcrest source jar references (not available and/or necessary) Patch0: %{pkg_name}-no-hamcrest-src.patch +Patch1: %{pkg_name}-ignore-bridge-methods.patch BuildRequires: %{?scl_prefix}ant BuildRequires: %{?scl_prefix_maven}ant-contrib @@ -90,6 +91,7 @@ Demonstrations and samples for %{pkg_name}. %{?scl:scl enable %{scl_maven} %{scl} - <<"EOF"} set -e -x %patch0 -p1 +%patch1 -p1 cp build/maven/junit-pom-template.xml pom.xml # fix placeholder version in pom @@ -152,6 +154,9 @@ cp -pr %{pkg_name}%{version}/%{pkg_name}/* %{buildroot}%{_datadir}/%{pkg_name}/d %doc junit%{version}/doc/* %changelog +* Wed Feb 17 2016 Michael Simacek - 0:4.11-8.16 +- Ignore bridge methods to fix build under JDK 7 + * Thu Jul 02 2015 Michael Simacek - 0:4.11-8.15 - Fix OSGi manifest metadata (rhbz#1238311)