From 143dc00baa49074b2d7d7d1bfb91a3a665086f69 Mon Sep 17 00:00:00 2001 From: Eric Bruneton Date: Mon, 14 Mar 2022 16:17:40 +0100 Subject: [PATCH 1/2] Upgrade Gradle to 7.4.1 version, and plugins to latest versions. --- .gitlab-ci.yml | 2 +- .../src/main/java/org/objectweb/asm/test/ClassFile.java | 2 +- .../org/objectweb/asm/util/CheckMethodAdapterTest.java | 2 +- build.gradle | 8 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- tools/pmd.xml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 432ac0f94..0cfedfd92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: gradle:7.3.3-jdk11 +image: gradle:7.4.1-jdk11 variables: # Set the location of the dependency cache to a local directory, so that it diff --git a/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java b/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java index 0b138907c..ff932d148 100644 --- a/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java +++ b/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java @@ -202,7 +202,7 @@ public class ClassFile { for (Class parameterType : constructor.getParameterTypes()) { arguments.add(Array.get(Array.newInstance(parameterType, 1), 0)); } - constructor.setAccessible(true); + constructor.setAccessible(true); // NOPMD(AvoidAccessibilityAlteration): ok for tests. return constructor.newInstance(arguments.toArray(new Object[0])); } return null; diff --git a/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java b/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java index 091177efb..89dbc1216 100644 --- a/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java +++ b/asm-util/src/test/java/org/objectweb/asm/util/CheckMethodAdapterTest.java @@ -215,7 +215,7 @@ class CheckMethodAdapterTest extends AsmTest implements Opcodes { checkMethodAdapter.visitInsn(NOP); Executable visitFrame = - () -> checkMethodAdapter.visitFrame(F_FULL, 1, new Object[] {new Float(0.0f)}, 0, null); + () -> checkMethodAdapter.visitFrame(F_FULL, 1, new Object[] {Float.valueOf(0.0f)}, 0, null); Exception exception = assertThrows(IllegalArgumentException.class, visitFrame); assertEquals("Invalid stack frame value: 0.0", exception.getMessage()); diff --git a/build.gradle b/build.gradle index a740bf6f2..1022b3519 100644 --- a/build.gradle +++ b/build.gradle @@ -28,10 +28,10 @@ buildscript { repositories { mavenCentral() } - dependencies { classpath 'org.netbeans.tools:sigtest-maven-plugin:1.3' } + dependencies { classpath 'org.netbeans.tools:sigtest-maven-plugin:1.5' } } -plugins { id 'biz.aQute.bnd.builder' version '6.1.0' apply false } +plugins { id 'biz.aQute.bnd.builder' version '6.2.0' apply false } plugins { id 'com.github.sherter.google-java-format' version '0.9' apply false } plugins { id 'me.champeau.gradle.jmh' version '0.5.3' apply false } plugins { id 'org.sonarqube' version '3.3' apply false } @@ -163,7 +163,7 @@ project(':tools:bnd-module-plugin') { description = "bnd plugin to build moduleinfo with ${rootProject.description}" // TODO: this compiles asm twice (here and in :asm), find a way to avoid this. sourceSets.main.java.srcDirs += project(':asm').sourceSets.main.java.srcDirs - depends = ['biz.aQute.bnd:biz.aQute.bnd:6.1.0'] + depends = ['biz.aQute.bnd:biz.aQute.bnd:6.2.0'] } project(':tools:retrofitter') { @@ -180,7 +180,7 @@ project(':tools:retrofitter') { // and tested with :asm-test and JUnit. subprojects { apply plugin: 'com.github.sherter.google-java-format' - googleJavaFormat.toolVersion = '1.13.0' + googleJavaFormat.toolVersion = '1.15.0' googleJavaFormat.exclude 'src/resources/java/**/*' // Check the coding style with Checkstyle. Fail in case of error or warning. diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d10985fdf..4462a0e42 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip diff --git a/tools/pmd.xml b/tools/pmd.xml index 9b098ed77..a4d73723a 100644 --- a/tools/pmd.xml +++ b/tools/pmd.xml @@ -102,7 +102,7 @@ - + -- GitLab From d06cb7b80cc37b41365795f9ed370a980820687e Mon Sep 17 00:00:00 2001 From: Eric Bruneton Date: Mon, 14 Mar 2022 16:27:23 +0100 Subject: [PATCH 2/2] Fix Java formatting. --- asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java b/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java index ff932d148..c4fc9aba0 100644 --- a/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java +++ b/asm-test/src/main/java/org/objectweb/asm/test/ClassFile.java @@ -202,7 +202,7 @@ public class ClassFile { for (Class parameterType : constructor.getParameterTypes()) { arguments.add(Array.get(Array.newInstance(parameterType, 1), 0)); } - constructor.setAccessible(true); // NOPMD(AvoidAccessibilityAlteration): ok for tests. + constructor.setAccessible(true); // NOPMD(AvoidAccessibilityAlteration): ok for tests. return constructor.newInstance(arguments.toArray(new Object[0])); } return null; -- GitLab