Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package powermock for openSUSE:Factory checked in at 2022-03-24 22:57:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/powermock (Old) and /work/SRC/openSUSE:Factory/.powermock.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "powermock" Thu Mar 24 22:57:32 2022 rev:3 rq:964376 version:1.6.5 Changes: -------- --- /work/SRC/openSUSE:Factory/powermock/powermock.changes 2022-03-18 16:43:09.685225374 +0100 +++ /work/SRC/openSUSE:Factory/.powermock.new.1900/powermock.changes 2022-03-24 22:57:54.228244936 +0100 @@ -1,0 +2,9 @@ +Wed Mar 23 21:05:58 UTC 2022 - Fridrich Strba <[email protected]> + +- Build with java source and target levels 8 +- Modified patch: + * fix-build.patch + + Add a rewrite of function call with ?: into an if/else + statement, which fixes JDK 17 build + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ powermock.spec ++++++ --- /var/tmp/diff_new_pack.3jtb6H/_old 2022-03-24 22:57:54.772245461 +0100 +++ /var/tmp/diff_new_pack.3jtb6H/_new 2022-03-24 22:57:54.776245465 +0100 @@ -37,6 +37,7 @@ # this is the same patch as in mockito to fix incompatibility with our cglib Patch2: 0002-Setting-naming-policy.patch BuildRequires: fdupes +BuildRequires: java-devel >= 1.8 BuildRequires: maven-local BuildRequires: mvn(cglib:cglib-nodep) BuildRequires: mvn(commons-logging:commons-logging) @@ -196,6 +197,9 @@ %pom_add_dep javax.activation:javax.activation-api tests/utils %endif +%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:source" "1.8" +%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:target" "1.8" + %{mvn_package} :powermock-core core %{mvn_package} :powermock-classloading-base core %{mvn_package} :powermock-classloading-objenesis core @@ -216,7 +220,7 @@ %{mvn_package} ::pom: __noinstall %build -%{mvn_build} -f -- -Dsource=6 +%{mvn_build} -f -- -Dsource=8 %install %mvn_install ++++++ fix-build.patch ++++++ --- /var/tmp/diff_new_pack.3jtb6H/_old 2022-03-24 22:57:54.808245496 +0100 +++ /var/tmp/diff_new_pack.3jtb6H/_new 2022-03-24 22:57:54.816245503 +0100 @@ -1,6 +1,5 @@ -diff -urEbwB powermock-powermock-1.6.5/core/src/main/java/org/powermock/core/ClassReplicaCreator.java powermock-powermock-1.6.5.new/core/src/main/java/org/powermock/core/ClassReplicaCreator.java --- powermock-powermock-1.6.5/core/src/main/java/org/powermock/core/ClassReplicaCreator.java 2016-04-30 07:22:01.000000000 +0200 -+++ powermock-powermock-1.6.5.new/core/src/main/java/org/powermock/core/ClassReplicaCreator.java 2018-11-19 15:25:16.875884583 +0100 ++++ powermock-powermock-1.6.5/core/src/main/java/org/powermock/core/ClassReplicaCreator.java 2018-11-19 15:25:16.875884583 +0100 @@ -96,7 +95,7 @@ CtConstructor copy = CtNewConstructor.copy(ctConstructor, newClass, null); newClass.addConstructor(copy); @@ -10,4 +9,26 @@ } catch (Exception e) { throw new RuntimeException(e); } +--- powermock-powermock-1.6.5/modules/module-impl/junit4/src/main/java/org/powermock/modules/junit4/internal/impl/DelegatingPowerMockRunner.java 2022-03-23 10:33:03.950752843 +0100 ++++ powermock-powermock-1.6.5/modules/module-impl/junit4/src/main/java/org/powermock/modules/junit4/internal/impl/DelegatingPowerMockRunner.java 2022-03-23 21:58:42.906207848 +0100 +@@ -97,12 +98,16 @@ + @Override + public Runner call() throws Exception { + try { ++ if (testClass.isAnnotationPresent(PowerMockRunnerDelegate.class)) { ++ return Whitebox.invokeConstructor(testClass.getAnnotation(PowerMockRunnerDelegate.class).value(), ++ new Class[] {Class.class}, ++ new Object[] {testClass}); ++ } else { + return Whitebox.invokeConstructor( +- testClass.isAnnotationPresent(PowerMockRunnerDelegate.class) +- ? testClass.getAnnotation(PowerMockRunnerDelegate.class).value() +- : PowerMockRunnerDelegate.DefaultJUnitRunner.class, ++ PowerMockRunnerDelegate.DefaultJUnitRunner.class, + new Class[] {Class.class}, + new Object[] {testClass}); ++ } + } catch (ConstructorNotFoundException rootProblem) { + if (testClass.isAnnotationPresent(PowerMockRunnerDelegate.class) + && JUnitVersion.isGreaterThanOrEqualTo("4.5")) {
