diff options
author | Eric Bruneton <ebruneton@free.fr> | 2020-04-06 11:24:55 +0200 |
---|---|---|
committer | Eric Bruneton <ebruneton@free.fr> | 2020-04-06 11:43:45 +0200 |
commit | ea53613f2c2de658f62384514308dd2b8d963c7f (patch) | |
tree | 9399b49c4d1421d234e6a3e0d60d293e6d06f908 /tools | |
parent | ed4d6072db9ffcd0d791bc86ed6736982c50cb81 (diff) | |
download | ow2-asm-ea53613f2c2de658f62384514308dd2b8d963c7f.tar.gz |
Update to Gradle 6.3 and add a benchmark for ASM 8.0.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/checkstyle.xml | 1 | ||||
-rw-r--r-- | tools/pmd.xml | 1 | ||||
-rw-r--r-- | tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java | 31 |
3 files changed, 17 insertions, 16 deletions
diff --git a/tools/checkstyle.xml b/tools/checkstyle.xml index bdb7c18b..f0274ad9 100644 --- a/tools/checkstyle.xml +++ b/tools/checkstyle.xml @@ -88,7 +88,6 @@ <property name="allowMissingParamTags" value="true" /> <property name="allowMissingThrowsTags" value="true" /> <property name="allowMissingReturnTag" value="true" /> - <property name="minLineCount" value="2" /> <property name="allowedAnnotations" value="Override,BeforeEach,Test,ParameterizedTest,Setup,Benchmark" /> <property name="allowThrowsTagsForSubclasses" value="true" /> diff --git a/tools/pmd.xml b/tools/pmd.xml index a103c5ae..b6e25894 100644 --- a/tools/pmd.xml +++ b/tools/pmd.xml @@ -91,7 +91,6 @@ <exclude name="FinalizeOverloaded" /> <exclude name="FinalizeShouldBeProtected" /> <!-- Not relevant for ASM (no logging and using JUnit 5). --> - <exclude name="InvalidSlf4jMessageFormat" /> <exclude name="JUnitSpelling" /> <exclude name="JUnitStaticSuite" /> <exclude name="LoggerIsNotStaticFinal" /> diff --git a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java index 59c071e0..2d017ed2 100644 --- a/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java +++ b/tools/retrofitter/src/main/java/org/objectweb/asm/tools/Retrofitter.java @@ -74,23 +74,26 @@ public class Retrofitter { * @throws IOException if the JDK API description file can't be read. */ public Retrofitter() throws IOException { - InputStream inputStream = - new GZIPInputStream( - Retrofitter.class.getClassLoader().getResourceAsStream("jdk1.5.0.12.txt.gz")); - BufferedReader reader = new LineNumberReader(new InputStreamReader(inputStream)); - while (true) { - String line = reader.readLine(); - if (line != null) { - if (line.startsWith("class")) { - String className = line.substring(6, line.lastIndexOf(' ')); - String superClassName = line.substring(line.lastIndexOf(' ') + 1); - jdkHierarchy.put(className, superClassName); + try (InputStream inputStream = + new GZIPInputStream( + Retrofitter.class.getClassLoader().getResourceAsStream("jdk1.5.0.12.txt.gz")); + BufferedReader reader = new LineNumberReader(new InputStreamReader(inputStream))) { + while (true) { + String line = reader.readLine(); + if (line != null) { + if (line.startsWith("class")) { + String className = line.substring(6, line.lastIndexOf(' ')); + String superClassName = line.substring(line.lastIndexOf(' ') + 1); + jdkHierarchy.put(className, superClassName); + } else { + jdkApi.add(line); + } } else { - jdkApi.add(line); + break; } - } else { - break; } + } catch (IOException ioe) { + throw ioe; } } |