Commit 3882e860 authored by Eric Bruneton's avatar Eric Bruneton

Update to more recent versions of Gradle, PMD, Checkstyle, etc.

parent 3004e828
Pipeline #5311 passed with stage
in 11 minutes and 6 seconds
image: gradle:5.1.1-jdk8-alpine
image: gradle:5.3.1-jdk8-alpine
variables:
# Set the location of the dependency cache to a local directory, so that it
......
......@@ -254,7 +254,7 @@ public class SimpleVerifier extends BasicVerifier {
type1 = type1.getElementType();
type2 = type2.getElementType();
}
do {
while (true) {
if (type1 == null || isInterface(type1)) {
return newArrayValue(Type.getObjectType("java/lang/Object"), numDimensions);
}
......@@ -262,7 +262,7 @@ public class SimpleVerifier extends BasicVerifier {
if (isAssignableFrom(type1, type2)) {
return newArrayValue(type1, numDimensions);
}
} while (true);
}
}
return BasicValue.UNINITIALIZED_VALUE;
}
......
......@@ -218,10 +218,14 @@ public class AnalyzerAdapterTest extends AsmTest {
*/
private ArrayList<Object> toFrameTypes(final List<Object> analyzerTypes) {
ArrayList<Object> frameTypes = new ArrayList<>();
for (int i = 0; i < analyzerTypes.size(); ) {
for (int i = 0; i < analyzerTypes.size(); ++i) {
if (i > 0
&& (analyzerTypes.get(i - 1) == Opcodes.LONG
|| analyzerTypes.get(i - 1) == Opcodes.DOUBLE)) {
continue;
}
Object value = analyzerTypes.get(i);
frameTypes.add(value);
i += (value == Opcodes.LONG || value == Opcodes.DOUBLE) ? 2 : 1;
}
return frameTypes;
}
......
......@@ -1747,6 +1747,8 @@ public class ClassFile {
}
/**
* Returns the constant pool item with the given index.
*
* @param <C> a CpInfo subclass.
* @param cpIndex a constant pool entry index.
* @param cpInfoType the expected type of the constant pool entry.
......
......@@ -31,10 +31,10 @@ buildscript {
dependencies { classpath 'org.netbeans.tools:sigtest-maven-plugin:1.1' }
}
plugins { id 'biz.aQute.bnd.builder' version '4.1.0' apply false }
plugins { id 'biz.aQute.bnd.builder' version '4.2.0' apply false }
plugins { id 'com.github.sherter.google-java-format' version '0.8' apply false }
plugins { id 'me.champeau.gradle.jmh' version '0.4.8' apply false }
plugins { id 'org.sonarqube' version '2.6.2' apply false }
plugins { id 'org.sonarqube' version '2.7.1' apply false }
description = 'ASM, a very small and fast Java bytecode manipulation framework'
......@@ -173,7 +173,7 @@ subprojects {
// Check the coding style with Checkstyle. Fail in case of error or warning.
apply plugin: 'checkstyle'
checkstyle.toolVersion = '8.17'
checkstyle.toolVersion = '8.20'
checkstyle.configFile = file("${rootDir}/tools/checkstyle.xml")
checkstyle.maxErrors = 0
checkstyle.maxWarnings = 0
......@@ -181,7 +181,7 @@ subprojects {
// Check the code with PMD. TODO remove toolVersion when default version uses
// ASM7 (default 6.8.0 uses ASM7_EXPERIMENTAL -> does not work with HEAD).
apply plugin: 'pmd'
pmd.toolVersion = '6.3.0'
pmd.toolVersion = '6.14.0'
pmd.ruleSets = []
pmd.ruleSetFiles = files("${rootDir}/tools/pmd.xml")
pmd.consoleOutput = true
......
......@@ -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-5.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-bin.zip
......@@ -51,14 +51,19 @@
<properties>
<property name="violationSuppressXPath"
value="//MethodDeclaration[@Private='true' or
@PackagePrivate='true']"/>
@PackagePrivate='true']" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray">
<properties>
<property name="violationSuppressXPath"
value="//MethodDeclaration[@Private='true' or
@PackagePrivate='true']"/>
@PackagePrivate='true']" />
</properties>
</rule>
<rule ref="category/java/bestpractices.xml/ForLoopVariableCount">
<properties>
<property name="maximumVariables" value="2" />
</properties>
</rule>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment