From 4bd04e91e13962719b51edf0cc4eafa17df87889 Mon Sep 17 00:00:00 2001 From: Mark Roberts Date: Fri, 25 Sep 2026 17:30:58 -0700 Subject: [PATCH] update to bcel 6.9 --- .github/workflows/maven.yml | 10 +- README.md | 4 +- RELEASE-NOTES.txt | 1130 ++-- docs/eps/classloader.fig | 94 +- docs/verifier/V_API_SD.eps | 4682 ++++++++--------- pom.xml | 1238 ++--- src/assembly/bin.xml | 4 +- src/assembly/src.xml | 4 +- src/changes/changes.xml | 60 +- src/changes/release-notes.vm | 34 +- src/conf/checkstyle-suppressions.xml | 5 +- src/conf/checkstyle.xml | 8 +- src/examples/ListClass.java | 10 +- src/main/java/org/apache/bcel/Const.java | 5 +- .../bcel/classfile/AnnotationEntry.java | 8 +- .../apache/bcel/classfile/Annotations.java | 10 +- .../bcel/classfile/ArrayElementValue.java | 4 +- .../org/apache/bcel/classfile/Attribute.java | 2 + .../bcel/classfile/BootstrapMethod.java | 7 +- .../bcel/classfile/BootstrapMethods.java | 4 +- .../apache/bcel/classfile/ClassParser.java | 2 +- .../java/org/apache/bcel/classfile/Code.java | 8 +- .../apache/bcel/classfile/CodeException.java | 2 +- .../org/apache/bcel/classfile/Constant.java | 2 + .../apache/bcel/classfile/ConstantPool.java | 6 +- .../bcel/classfile/DescendingVisitor.java | 20 +- .../apache/bcel/classfile/ElementValue.java | 1 + .../apache/bcel/classfile/ExceptionTable.java | 4 +- .../java/org/apache/bcel/classfile/Field.java | 5 - .../apache/bcel/classfile/FieldOrMethod.java | 10 +- .../apache/bcel/classfile/InnerClasses.java | 6 +- .../org/apache/bcel/classfile/JavaClass.java | 44 +- .../bcel/classfile/LineNumberTable.java | 21 +- .../bcel/classfile/LocalVariableTable.java | 8 +- .../classfile/LocalVariableTypeTable.java | 11 +- .../org/apache/bcel/classfile/Method.java | 5 - .../bcel/classfile/MethodParameters.java | 8 +- .../apache/bcel/classfile/ModulePackages.java | 4 +- .../apache/bcel/classfile/NestMembers.java | 4 +- .../classfile/ParameterAnnotationEntry.java | 16 +- .../bcel/classfile/ParameterAnnotations.java | 8 +- .../org/apache/bcel/classfile/Record.java | 149 + .../bcel/classfile/RecordComponentInfo.java | 135 + .../RuntimeInvisibleAnnotations.java | 8 +- .../RuntimeInvisibleParameterAnnotations.java | 2 + .../classfile/RuntimeVisibleAnnotations.java | 8 +- .../RuntimeVisibleParameterAnnotations.java | 2 + .../org/apache/bcel/classfile/StackMap.java | 4 +- .../apache/bcel/classfile/StackMapEntry.java | 1 - .../org/apache/bcel/classfile/Utility.java | 6 +- .../org/apache/bcel/classfile/Visitor.java | 23 + .../bcel/generic/AnnotationEntryGen.java | 11 +- .../bcel/generic/ArrayElementValueGen.java | 9 +- .../org/apache/bcel/generic/ClassGen.java | 49 +- .../bcel/generic/FieldGenOrMethodGen.java | 6 +- .../apache/bcel/generic/FieldOrMethod.java | 1 - .../bcel/generic/InstructionFactory.java | 6 +- .../apache/bcel/generic/InstructionList.java | 51 +- .../org/apache/bcel/generic/MethodGen.java | 24 +- .../java/org/apache/bcel/generic/Select.java | 2 +- .../java/org/apache/bcel/util/Class2HTML.java | 2 +- .../apache/bcel/util/InstructionFinder.java | 1 - .../apache/bcel/util/SyntheticRepository.java | 4 +- .../bcel/verifier/statics/Pass2Verifier.java | 2 +- .../bcel/verifier/statics/Pass3aVerifier.java | 3 +- .../statics/StringRepresentation.java | 13 + .../bcel/verifier/structurals/Frame.java | 19 +- .../verifier/structurals/LocalVariables.java | 6 +- .../structurals/UninitializedObjectType.java | 1 - src/site/xdoc/download_bcel.xml | 26 +- src/site/xdoc/index.xml | 174 +- .../apache/bcel/CounterVisitorTestCase.java | 5 + .../java/org/apache/bcel/HandleTestCase.java | 296 +- .../ConstantPoolModuleToStringTestCase.java | 3 +- .../apache/bcel/classfile/RecordTestCase.java | 121 + .../bcel/classfile/UtilityTestCase.java | 46 +- .../org/apache/bcel/data/PLSETestClass2.java | 58 +- .../bcel/generic/EmptyVisitorTestCase.java | 16 +- .../GeneratingAnnotatedClassesTestCase.java | 6 +- .../generic/InstructionFactoryTestCase.java | 6 + .../org/apache/bcel/generic/TypeTestCase.java | 3 +- .../apache/bcel/util/BCELifierTestCase.java | 3 +- .../apache/bcel/util/ClassPathTestCase.java | 92 +- .../util/ModularRuntimeImageTestCase.java | 150 +- .../bcel/verifier/JiraBcel369TestCase.java | 4 +- .../bcel/verifier/VerifierTestCase.java | 4 +- .../bcel/verifier/tests/JvmOpCodes.java | 5 +- .../verifier/tests/TestReturn03Creator.java | 8 +- .../apache/bcel/visitors/CountingVisitor.java | 19 + src/test/resources/StackMapExample2.java | 24 +- src/test/resources/record/SimpleRecord.class | Bin 0 -> 1506 bytes src/test/resources/record/SimpleRecord.java | 5 + 92 files changed, 4955 insertions(+), 4185 deletions(-) create mode 100644 src/main/java/org/apache/bcel/classfile/Record.java create mode 100644 src/main/java/org/apache/bcel/classfile/RecordComponentInfo.java create mode 100644 src/test/java/org/apache/bcel/classfile/RecordTestCase.java create mode 100644 src/test/resources/record/SimpleRecord.class create mode 100644 src/test/resources/record/SimpleRecord.java diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 45b24a783c..62795fbd96 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -29,11 +29,15 @@ jobs: java: [ 8, 11, 17, 21 ] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Prepare git + run: git config --global core.autocrlf false + - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + with: + persist-credentials: false - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0 + uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 with: distribution: 'temurin' java-version: ${{ matrix.java }} - name: Build with Maven - run: mvn -V apache-rat:check package --file pom.xml + run: mvn --show-version --batch-mode --no-transfer-progress -DtrimStackTrace=false diff --git a/README.md b/README.md index 4e10557350..243719864a 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Apache Commons BCEL [![Java CI](https://github.com/apache/commons-bcel/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/commons-bcel/actions/workflows/maven.yml) [![Coverage Status](https://codecov.io/gh/apache/commons-bcel/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/commons-bcel) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.bcel/bcel/badge.svg?gav=true)](https://maven-badges.herokuapp.com/maven-central/org.apache.bcel/bcel/?gav=true) -[![Javadocs](https://javadoc.io/badge/org.apache.bcel/bcel/6.8.1.svg)](https://javadoc.io/doc/org.apache.bcel/bcel/6.8.1) +[![Javadocs](https://javadoc.io/badge/org.apache.bcel/bcel/6.9.0.svg)](https://javadoc.io/doc/org.apache.bcel/bcel/6.9.0) [![CodeQL](https://github.com/apache/commons-bcel/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/apache/commons-bcel/actions/workflows/codeql-analysis.yml) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/apache/commons-bcel/badge)](https://api.securityscorecards.dev/projects/github.com/apache/commons-bcel) @@ -69,7 +69,7 @@ Alternatively, you can pull it from the central Maven repositories: org.apache.bcel bcel - 6.8.1 + 6.9.0 ``` diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 926f741a78..6677e03765 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,12 +1,101 @@ - Apache Commons BCEL - Version 6.8.1 - RELEASE NOTES +Apache Commons BCEL +Version 6.9.0 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ +The Apache Commons BCEL team is pleased to announce the release of +Apache Commons BCEL 6.9.0. + +The Byte Code Engineering Library (BCEL) is intended to give users a convenient +way to analyze, create, and manipulate compiled .class files. Classes are +represented by objects containing all the symbolic information of the given +class: methods, fields, and byte code instructions. + +Maintenance and bug fix release. + +Changes +------- +* Add Support for Java 16 records #290. Thanks to Pablo Nicolas Diaz, Gary Gregory, Paul King, Mark Roberts. +* Add null guard for InstructionFactory.createInvoke() #289. Thanks to Heewon Lee. +* Avoid possible NullPointerException in org.apache.bcel.classfile.DescendingVisitor.accept(E[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in AnnotationEntryGen.getAnnotationAttributes(ConstantPoolGen, AnnotationEntryGen[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in AnnotationEntryGen.copyValues(ElementValuePair[], ConstantPoolGen, boolean). Thanks to Gary Gregory. +* Avoid possible NullPointerException in ArrayElementValueGen.ArrayElementValueGen(int, ElementValue[], ConstantPoolGen). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.setMethods(Method[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.unpackAnnotations(Attribute[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.classfile.ParameterAnnotationEntry.createParameterAnnotationEntries(Attribute[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.ClassGen(JavaClass). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.generic.FieldGenOrMethodGen.addAll(Attribute[]). Thanks to Gary Gregory. +* Avoid possible NullPointerException in org.apache.bcel.classfile.ParameterAnnotationEntry.createParameterAnnotationEntries(Attribute[]). Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.MethodParameters.setParameters(MethodParameter[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.ParameterAnnotations.setParameterAnnotationTable(ParameterAnnotationEntry[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.LocalVariableTypeTable.setLocalVariableTable(LocalVariable[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.LocalVariableTable.setLocalVariableTable(LocalVariable[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.LineNumberTable.setLineNumberTable(LineNumber[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setMethods(Method[] with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setInterfaces(int[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setInterfaceNames(String[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setFields(Field[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setAttributes(Attribute[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.ConstantPool.setConstantPool(Constant[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.FieldOrMethod.setAttributes(Attribute[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.Annotations.setAnnotationTable(AnnotationEntry[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.ArrayElementValue.ArrayElementValue(int, ElementValue[], ConstantPool) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethod.BootstrapMethod(int, int[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethod.setBootstrapArguments(int[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethods.BootstrapMethods(int, int, BootstrapMethod[], ConstantPool) with null. Thanks to Gary Gregory. +* Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethods.setBootstrapMethods(BootstrapMethod[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.redirectLocalVariables(LocalVariableGen[], InstructionHandle, InstructionHandle) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.redirectExceptionHandlers(CodeExceptionGen[], InstructionHandle, InstructionHandle) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.findHandle(InstructionHandle[], int[], int, int) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.setArgumentTypes(Type[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.setArgumentNames(String[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.removeRuntimeAttributes(Attribute[]) with null. Thanks to Gary Gregory. +* Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.makeMutableVersion(AnnotationEntry[]) with null. Thanks to Gary Gregory. +* Bump org.apache.commons:commons-parent from 66 to 69 #283, #297. Thanks to Dependabot. +* Bump org.jetbrains.kotlin:kotlin-stdlib from 1.9.22 to 1.9.23 #284. Thanks to Dependabot. +* Bump commons-io:commons-io from 2.15.1 to 2.16.1 #295, #300. Thanks to Dependabot. + + +Historical list of changes: https://commons.apache.org/proper/commons-bcel/changes-report.html + +For complete information on Apache Commons BCEL, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons BCEL website: + +https://commons.apache.org/proper/commons-bcel + +Download it from https://commons.apache.org/proper/commons-bcel/download_bcel.cgi + +Have fun! +-Apache Commons BCEL team + +Feedback +-------- +Open source works best when you give feedback: + + https://commons.apache.org/bcel +Please direct all bug reports to JIRA: + + https://issues.apache.org/jira/browse/BCEL + +Or subscribe to the commons-user mailing list + +The Apache Commons Team + +----------------------------------------------------------------------------- + +Apache Commons BCEL +Version 6.8.2 +RELEASE NOTES + + +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of -Apache Commons BCEL 6.8.1. +Apache Commons BCEL 6.8.2. The Byte Code Engineering Library (BCEL) is intended to give users a convenient way to analyze, create, and manipulate compiled .class files. Classes are @@ -15,27 +104,84 @@ class: methods, fields, and byte code instructions. Maintenance and bug fix release. -FIXED BUGS: -=========== +New Features +------------ +* Fix ConcurrentModificationException in org.apache.bcel.util.SyntheticRepository.getInstance() #275. Thanks to Guillaume Nodet. +* Add Maven property project.build.outputTimestamp for build reproducibility. Thanks to Gary Gregory. + +Changes +------- +* Bump GitHub various actions for CI builds. Thanks to Dependabot. +* Bump org.assertj:assertj-core from 3.25.1 to 3.25.2. Thanks to Dependabot. +* Bump org.apache.commons:commons-parent from 65 to 66. Thanks to Dependabot. -o Replace internal use of StringBuffer with StringBuilder. Thanks to Gary Gregory. -o BCEL-370: CONSTANT_Dynamic is not handled in LDC #254. Thanks to Gary Gregory. -o BCELComparator now uses generics. Thanks to Gary Gregory. -o Avoid NullPointerException in ClassGen.BCELComparator#equals() and ClassGen.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in Constant.BCELComparator#equals() and Constant.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in Field.BCELComparator#equals() and Field.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in FieldGen.BCELComparator#equals() and FieldGen.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in JavaClass.BCELComparator#equals() and JavaClass.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in Method.BCELComparator#equals() and Method.BCELComparator#hashCode(). Thanks to Gary Gregory. -o Avoid NullPointerException in MethodGen.BCELComparator#equals() and MethodGen.BCELComparator#hashCode(). Thanks to Gary Gregory. -CHANGES: -======== +Historical list of changes: https://commons.apache.org/proper/commons-bcel/changes-report.html + +For complete information on Apache Commons BCEL, including instructions on how to submit bug reports, +patches, or suggestions for improvement, see the Apache Commons BCEL website: + +https://commons.apache.org/proper/commons-bcel + +Download it from https://commons.apache.org/proper/commons-bcel/download_bcel.cgi -o Bump GitHub various actions for CI builds. Thanks to Dependabot. -o Bump jna.version from 5.13.0 to 5.14.0 #250. Thanks to Dependabot. -o Bump org.jetbrains.kotlin:kotlin-stdlib from 1.9.21 to 1.9.22 #252. Thanks to Dependabot. -o Bump org.apache.commons:commons-exec from 1.3 to 1.4.0 #255. Thanks to Dependabot. +Have fun! +-Apache Commons BCEL team + +Feedback +-------- +Open source works best when you give feedback: + + https://commons.apache.org/bcel + +Please direct all bug reports to JIRA: + + https://issues.apache.org/jira/browse/BCEL + +Or subscribe to the commons-user mailing list + +The Apache Commons Team + +----------------------------------------------------------------------------- + +Apache Commons BCEL +Version 6.8.1 +RELEASE NOTES + + +Introduction +------------ +The Apache Commons BCEL team is pleased to announce the release of +Apache Commons BCEL 6.8.1. + +The Byte Code Engineering Library (BCEL) is intended to give users a convenient +way to analyze, create, and manipulate compiled .class files. Classes are +represented by objects containing all the symbolic information of the given +class: methods, fields, and byte code instructions. + +Maintenance and bug fix release. + +Fixed Bugs +----------- + +* Replace internal use of StringBuffer with StringBuilder. Thanks to Gary Gregory. +* BCEL-370: CONSTANT_Dynamic is not handled in LDC #254. Thanks to Gary Gregory. +* BCELComparator now uses generics. Thanks to Gary Gregory. +* Avoid NullPointerException in ClassGen.BCELComparator#equals() and ClassGen.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in Constant.BCELComparator#equals() and Constant.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in Field.BCELComparator#equals() and Field.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in FieldGen.BCELComparator#equals() and FieldGen.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in JavaClass.BCELComparator#equals() and JavaClass.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in Method.BCELComparator#equals() and Method.BCELComparator#hashCode(). Thanks to Gary Gregory. +* Avoid NullPointerException in MethodGen.BCELComparator#equals() and MethodGen.BCELComparator#hashCode(). Thanks to Gary Gregory. + +Changes +-------- + +* Bump GitHub various actions for CI builds. Thanks to Dependabot. +* Bump jna.version from 5.13.0 to 5.14.0 #250. Thanks to Dependabot. +* Bump org.jetbrains.kotlin:kotlin-stdlib from 1.9.21 to 1.9.22 #252. Thanks to Dependabot. +* Bump org.apache.commons:commons-exec from 1.3 to 1.4.0 #255. Thanks to Dependabot. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -67,13 +213,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.8.0 - RELEASE NOTES - +Apache Commons BCEL +Version 6.8.0 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.8.0! @@ -84,47 +230,47 @@ class: methods, fields and byte code instructions. Maintenance and bug fix release. -NEW FEATURES: -============= - -o Add and use InvalidMethodSignatureException extending ClassFormatException. Thanks to Gary Gregory. -o Increase code coverage in Class2HTMLTestCase with new test input Java4Example #186. Thanks to nbauma109. -o Add verifier tests on some opcodes #180. Thanks to nbauma109. -o Added signature test cases for class/method, and bad signatures #182. Thanks to nbauma109. -o Add Const.MAJOR_20. Thanks to Gary Gregory. -o Add Const.MINOR_20. Thanks to Gary Gregory. -o Add Const.MAJOR_21. Thanks to Gary Gregory. -o Add Const.MINOR_21. Thanks to Gary Gregory. -o [Bcelifier] stackmap support to pass JDK verifier #177. Thanks to nbauma109, Gary Gregory, Mark Roberts. -o Fix SpotBugs [ERROR] Class org.apache.bcel.util.ClassVector defines non-transient non-serializable instance field vec [org.apache.bcel.util.ClassVector] In ClassVector.java SE_BAD_FIELD. Thanks to Gary Gregory. -o Fix SpotBugs [ERROR] Switch statement found in org.apache.bcel.util.BCELFactory.visitAllocationInstruction(AllocationInstruction) where one case falls through to the next case [org.apache.bcel.util.BCELFactory, org.apache.bcel.util.BCELFactory] At BCELFactory.java:[lines 188-191]Another occurrence at BCELFactory.java:[lines 192-196] SF_SWITCH_FALLTHROUGH. Thanks to Gary Gregory. - -FIXED BUGS: -=========== - -o When parsing an class with an invalid constant reference, ensure ClassParser.parse() throws ClassFormatException, not NullPointerException. Thanks to OSS-Fuzz. -o Ensure that references to a constant pool entry with index zero trigger a ClassFormatException, not a NullPointerException. Thanks to OSS-Fuzz. -o Ensure that references to the unused constant pool entry after a long/double entry triggers a ClassFormatException, not a NullPointerException. Thanks to OSS-Fuzz. -o Test and coverage of InstructionFactory #190. Thanks to nbauma109. -o Verifier: test and coverage for SWAP instruction #188. Thanks to nbauma109. -o Exception parsing Kotlin class with 'fun `method name with () in it`()' #205. Thanks to Jason Copenhaver, Gary Gregory. -o Fix null pointers in AnnotationEntry #213. Thanks to nbauma109, Gary Gregory. -o Field not found, search field in both super class and implemented interfaces (5x duplicated code to find field by name and type is refactored to a new method and now supports package-private) #181. Thanks to nbauma109. -o BCEL-366: Use alternative name for broken classes under test #220. Thanks to Slawomir Jaranowski. -o BCEL-367: Fixes java.lang.IndexOutOfBoundsException for ATHROW on empty stack #223. Thanks to Katherine Hough, Gary Gregory. -o BCEL-368: Fixes java.lang.StackOverflowError in Select#toString(boolean) #229. Thanks to Katherine Hough, Gary Gregory. -o Fix for type.getType(...) use on non-signature type names #221. Thanks to nbauma109, Judit Knoll, Gary Gregory. -o Fix EmptyVisitorTestCase on Java 21. Thanks to Gary Gregory. - -CHANGES: -======== - -o Bump commons-parent from 54 to 65 #189, #198, #222. Thanks to Gary Gregory, Dependabot. -o Bump jna.version from 5.12.1 to 5.13.0 #203. Thanks to Dependabot. -o Bump kotlin-stdlib from 1.8.10 to 1.9.21 #217, #219, #227, #231, #235, #245, #247. Thanks to Dependabot. -o Bump commons-io from 2.11.0 to 2.15.1. Thanks to Dependabot. -o Bump commons-lang3 from 3.12.0 to 3.14.0. Thanks to Gary Gregory. -o Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 #246. Thanks to Gary Gregory. +New Features +------------- + +* Add and use InvalidMethodSignatureException extending ClassFormatException. Thanks to Gary Gregory. +* Increase code coverage in Class2HTMLTestCase with new test input Java4Example #186. Thanks to nbauma109. +* Add verifier tests on some opcodes #180. Thanks to nbauma109. +* Added signature test cases for class/method, and bad signatures #182. Thanks to nbauma109. +* Add Const.MAJOR_20. Thanks to Gary Gregory. +* Add Const.MINOR_20. Thanks to Gary Gregory. +* Add Const.MAJOR_21. Thanks to Gary Gregory. +* Add Const.MINOR_21. Thanks to Gary Gregory. +* [Bcelifier] stackmap support to pass JDK verifier #177. Thanks to nbauma109, Gary Gregory, Mark Roberts. +* Fix SpotBugs [ERROR] Class org.apache.bcel.util.ClassVector defines non-transient non-serializable instance field vec [org.apache.bcel.util.ClassVector] In ClassVector.java SE_BAD_FIELD. Thanks to Gary Gregory. +* Fix SpotBugs [ERROR] Switch statement found in org.apache.bcel.util.BCELFactory.visitAllocationInstruction(AllocationInstruction) where one case falls through to the next case [org.apache.bcel.util.BCELFactory, org.apache.bcel.util.BCELFactory] At BCELFactory.java:[lines 188-191]Another occurrence at BCELFactory.java:[lines 192-196] SF_SWITCH_FALLTHROUGH. Thanks to Gary Gregory. + +Fixed Bugs +----------- + +* When parsing an class with an invalid constant reference, ensure ClassParser.parse() throws ClassFormatException, not NullPointerException. Thanks to OSS-Fuzz. +* Ensure that references to a constant pool entry with index zero trigger a ClassFormatException, not a NullPointerException. Thanks to OSS-Fuzz. +* Ensure that references to the unused constant pool entry after a long/double entry triggers a ClassFormatException, not a NullPointerException. Thanks to OSS-Fuzz. +* Test and coverage of InstructionFactory #190. Thanks to nbauma109. +* Verifier: test and coverage for SWAP instruction #188. Thanks to nbauma109. +* Exception parsing Kotlin class with 'fun `method name with () in it`()' #205. Thanks to Jason Copenhaver, Gary Gregory. +* Fix null pointers in AnnotationEntry #213. Thanks to nbauma109, Gary Gregory. +* Field not found, search field in both super class and implemented interfaces (5x duplicated code to find field by name and type is refactored to a new method and now supports package-private) #181. Thanks to nbauma109. +* BCEL-366: Use alternative name for broken classes under test #220. Thanks to Slawomir Jaranowski. +* BCEL-367: Fixes java.lang.IndexOutOfBoundsException for ATHROW on empty stack #223. Thanks to Katherine Hough, Gary Gregory. +* BCEL-368: Fixes java.lang.StackOverflowError in Select#toString(boolean) #229. Thanks to Katherine Hough, Gary Gregory. +* Fix for type.getType(...) use on non-signature type names #221. Thanks to nbauma109, Judit Knoll, Gary Gregory. +* Fix EmptyVisitorTestCase on Java 21. Thanks to Gary Gregory. + +Changes +-------- + +* Bump commons-parent from 54 to 65 #189, #198, #222. Thanks to Gary Gregory, Dependabot. +* Bump jna.version from 5.12.1 to 5.13.0 #203. Thanks to Dependabot. +* Bump kotlin-stdlib from 1.8.10 to 1.9.21 #217, #219, #227, #231, #235, #245, #247. Thanks to Dependabot. +* Bump commons-io from 2.11.0 to 2.15.1. Thanks to Dependabot. +* Bump commons-lang3 from 3.12.0 to 3.14.0. Thanks to Gary Gregory. +* Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 #246. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -156,13 +302,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.7.0 - RELEASE NOTES +Apache Commons BCEL +Version 6.7.0 +RELEASE NOTES -INTRODUCTION: - +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.7.0! @@ -173,71 +319,71 @@ class: methods, fields and byte code instructions. Maintenance and bug fix release. -NEW FEATURES: -============= - -o Add org.apache.bcel.classfile.ClassFormatException.ClassFormatException(Throwable). Thanks to Gary Gregory. -o Add org.apache.bcel.classfile.JavaClass.EXTENSION. Thanks to Gary Gregory. -o Add org.apache.bcel.classfile.Module.EXTENSION. Thanks to Gary Gregory. -o Add org.apache.bcel.util.Args. Thanks to Gary Gregory. -o Add org.apache.bcel.generic.ArrayType.getClassName(). Thanks to Gary Gregory. -o Add org.apache.bcel.generic.Type.getClassName(). Thanks to Gary Gregory. -o Add org.apache.bcel.classfile.Utility.packageToPath(String). Thanks to Gary Gregory. -o org.apache.bcel.classfile.MethodParameter now implements org.apache.bcel.classfile.Node. Thanks to Gary Gregory, Mark Roberts. -o Add org.apache.bcel.classfile.JavaClass.getSourceFilePath(). Thanks to nbauma109, Gary Gregory. -o Add org.apache.bcel.generic.PUSH.PUSH(ConstantPoolGen, ArrayType). Thanks to nbauma109, Gary Gregory. - -FIXED BUGS: -=========== - -o Avoid internal NPE in org.apache.bcel.util.ClassPath.getInputStream(String, String). Thanks to Gary Gregory. -o InstructionConstants.ALOAD_0 value is wrong (regression from 6.6.0). Thanks to Gary Gregory. -o InstructionConstants.DCONST_0 value is wrong (regression from 6.6.0). Thanks to Gary Gregory. -o org.apache.bcel.classfile.Attribute constructors now throw ClassFormatException on invalid name index input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.CodeException constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.ConstantInvokeDynamic.ConstantInvokeDynamic(DataInput). Thanks to Gary Gregory. -o org.apache.bcel.classfile.ConstantValue constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.Deprecated constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.EnclosingMethod constructors now throw ClassFormatException on invalid length, class index, or method index input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.ExceptionTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.InnerClasses constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.LineNumber constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.LocalVariable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.LocalVariableTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.LocalVariableTypeTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.ModuleMainClass constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.ModulePackages constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.NestHost constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.NestMembers constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.Signature constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.SourceFile constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.StackMap constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. -o org.apache.bcel.classfile.StackMapEntry.StackMapEntry(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput. Thanks to Gary Gregory. -o org.apache.bcel.classfile.StackMapType.StackMapType(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput. Thanks to Gary Gregory. -o org.apache.bcel.classfile.Synthetic constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. -o org.apache.bcel.util.ClassPath hashCode() and equals() don't match. Thanks to Gary Gregory. -o Fix code duplication in org.apache.bcel.verifier.structurals.ExceptionHandlers.ExceptionHandlers(MethodGen). Thanks to Mark Roberts, Gary Gregory. -o Improve test coverage to bcel/generic and UtilityTest #162. Thanks to Sam Ng, Gary Gregory. -o Code coverage and bug fixes for bcelifier #171. Thanks to nbauma109, Gary Gregory. -o Code coverage and unit tests on the verifier #166. Thanks to nbauma109, Gary Gregory. -o Typo in SimpleElementValue error message #161. Thanks to nbauma109, Gary Gregory. -o org.apache.bcel.classfile.Attribute constructors now throw ClassFormatException on invalid length input. Thanks to Mark Thomas, Gary Gregory. -o References to constant pool entries that are not of the expected type should throw ClassFormatException, not ClassCastException. Thanks to OSS-Fuzz. -o When parsing an invalid class, ensure ClassParser.parse() throws ClassFormatException, not IllegalArgumentException. Thanks to OSS-Fuzz. -o org.apache.bcel.classfile.Code constructors now throw ClassFormatException on invalid input. Thanks to OSS-Fuzz. -o org.apache.bcel.classfile.StackMapType constructors now throw ClassFormatException on invalid input. Thanks to OSS-Fuzz. -o When parsing class files, limit arrays to no more than 255 dimensions as per section 4.4.1 of the JVM specification. Thanks to OSS-Fuzz. -o Tests and coverage for Utility class #175. Thanks to nbauma109. -o Unit tests and coverage for binary operations #174. Thanks to nbauma109. -o Fix possible NullPointerException in org.apache.bcel.classfile.StackMap.setStackMap(StackMapEntry[]). Thanks to Gary Gregory. - -CHANGES: -======== - -o Bump spotbugs-maven-plugin from 4.7.2.2 to 4.7.3.0 #167. Thanks to Gary Gregory. -o Bump jmh.version from 1.35 to 1.36 #170. Thanks to Dependabot. -o Bump pmd from 6.51.0 to 6.52.0. Thanks to Gary Gregory. -o Bump japicmp from 0.16.0 to 0.17.1. Thanks to Gary Gregory. +New Features +------------- + +* Add org.apache.bcel.classfile.ClassFormatException.ClassFormatException(Throwable). Thanks to Gary Gregory. +* Add org.apache.bcel.classfile.JavaClass.EXTENSION. Thanks to Gary Gregory. +* Add org.apache.bcel.classfile.Module.EXTENSION. Thanks to Gary Gregory. +* Add org.apache.bcel.util.Args. Thanks to Gary Gregory. +* Add org.apache.bcel.generic.ArrayType.getClassName(). Thanks to Gary Gregory. +* Add org.apache.bcel.generic.Type.getClassName(). Thanks to Gary Gregory. +* Add org.apache.bcel.classfile.Utility.packageToPath(String). Thanks to Gary Gregory. +* org.apache.bcel.classfile.MethodParameter now implements org.apache.bcel.classfile.Node. Thanks to Gary Gregory, Mark Roberts. +* Add org.apache.bcel.classfile.JavaClass.getSourceFilePath(). Thanks to nbauma109, Gary Gregory. +* Add org.apache.bcel.generic.PUSH.PUSH(ConstantPoolGen, ArrayType). Thanks to nbauma109, Gary Gregory. + +Fixed Bugs +----------- + +* Avoid internal NPE in org.apache.bcel.util.ClassPath.getInputStream(String, String). Thanks to Gary Gregory. +* InstructionConstants.ALOAD_0 value is wrong (regression from 6.6.0). Thanks to Gary Gregory. +* InstructionConstants.DCONST_0 value is wrong (regression from 6.6.0). Thanks to Gary Gregory. +* org.apache.bcel.classfile.Attribute constructors now throw ClassFormatException on invalid name index input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.CodeException constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.ConstantInvokeDynamic.ConstantInvokeDynamic(DataInput). Thanks to Gary Gregory. +* org.apache.bcel.classfile.ConstantValue constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.Deprecated constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.EnclosingMethod constructors now throw ClassFormatException on invalid length, class index, or method index input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.ExceptionTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.InnerClasses constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.LineNumber constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.LocalVariable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.LocalVariableTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.LocalVariableTypeTable constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.ModuleMainClass constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.ModulePackages constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.NestHost constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.NestMembers constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.Signature constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.SourceFile constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.StackMap constructors now throw ClassFormatException on invalid input. Thanks to Gary Gregory. +* org.apache.bcel.classfile.StackMapEntry.StackMapEntry(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput. Thanks to Gary Gregory. +* org.apache.bcel.classfile.StackMapType.StackMapType(DataInput, ConstantPool) reads signed instead of unsigned shorts from its DataInput. Thanks to Gary Gregory. +* org.apache.bcel.classfile.Synthetic constructors now throw ClassFormatException on invalid length input. Thanks to Gary Gregory. +* org.apache.bcel.util.ClassPath hashCode() and equals() don't match. Thanks to Gary Gregory. +* Fix code duplication in org.apache.bcel.verifier.structurals.ExceptionHandlers.ExceptionHandlers(MethodGen). Thanks to Mark Roberts, Gary Gregory. +* Improve test coverage to bcel/generic and UtilityTest #162. Thanks to Sam Ng, Gary Gregory. +* Code coverage and bug fixes for bcelifier #171. Thanks to nbauma109, Gary Gregory. +* Code coverage and unit tests on the verifier #166. Thanks to nbauma109, Gary Gregory. +* Typo in SimpleElementValue error message #161. Thanks to nbauma109, Gary Gregory. +* org.apache.bcel.classfile.Attribute constructors now throw ClassFormatException on invalid length input. Thanks to Mark Thomas, Gary Gregory. +* References to constant pool entries that are not of the expected type should throw ClassFormatException, not ClassCastException. Thanks to OSS-Fuzz. +* When parsing an invalid class, ensure ClassParser.parse() throws ClassFormatException, not IllegalArgumentException. Thanks to OSS-Fuzz. +* org.apache.bcel.classfile.Code constructors now throw ClassFormatException on invalid input. Thanks to OSS-Fuzz. +* org.apache.bcel.classfile.StackMapType constructors now throw ClassFormatException on invalid input. Thanks to OSS-Fuzz. +* When parsing class files, limit arrays to no more than 255 dimensions as per section 4.4.1 of the JVM specification. Thanks to OSS-Fuzz. +* Tests and coverage for Utility class #175. Thanks to nbauma109. +* Unit tests and coverage for binary operations #174. Thanks to nbauma109. +* Fix possible NullPointerException in org.apache.bcel.classfile.StackMap.setStackMap(StackMapEntry[]). Thanks to Gary Gregory. + +Changes +-------- + +* Bump spotbugs-maven-plugin from 4.7.2.2 to 4.7.3.0 #167. Thanks to Gary Gregory. +* Bump jmh.version from 1.35 to 1.36 #170. Thanks to Dependabot. +* Bump pmd from 6.51.0 to 6.52.0. Thanks to Gary Gregory. +* Bump japicmp from 0.16.0 to 0.17.1. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -269,13 +415,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.6.1 - RELEASE NOTES - +Apache Commons BCEL +Version 6.6.1 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.6.1! @@ -286,17 +432,17 @@ class: methods, fields and byte code instructions. Maintenance and bug fix release. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o Keep ConstantPool.getConstant(int) backward compatible with 6.5.0 #157. Thanks to Kengo TODA, Gary Gregory. +* Keep ConstantPool.getConstant(int) backward compatible with 6.5.0 #157. Thanks to Kengo TODA, Gary Gregory. -CHANGES: -======== +Changes +-------- -o Bump actions/setup-java from 3.5.1 to 3.6.0 #159. Thanks to Dependabot. -o Bump spotbugs from 4.7.2 to 4.7.3. Thanks to Gary Gregory. -o Bump pmd from 6.50.0 to 6.51.0. Thanks to Gary Gregory. +* Bump actions/setup-java from 3.5.1 to 3.6.0 #159. Thanks to Dependabot. +* Bump spotbugs from 4.7.2 to 4.7.3. Thanks to Gary Gregory. +* Bump pmd from 6.50.0 to 6.51.0. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -329,13 +475,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.6.0 - RELEASE NOTES +Apache Commons BCEL +Version 6.6.0 +RELEASE NOTES -INTRODUCTION: - +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.6.0! @@ -345,90 +491,90 @@ represented by objects containing all the symbolic information of the given class: methods, fields and byte code instructions. -NEW FEATURES: -============= - -o Add github/codeql-action. -o Make Annotations implement Iterable. Thanks to Gary Gregory. -o Make BootstrapMethods implement Iterable. Thanks to Gary Gregory. -o Make ConstantPool implement Iterable. Thanks to Gary Gregory. -o Make InnerClasses implement Iterable. Thanks to Gary Gregory. -o Make LineNumberTable implement Iterable. Thanks to Gary Gregory. -o Make LocalVariableTable implement Iterable. Thanks to Gary Gregory. -o Make LocalVariableTypeTable implement Iterable. Thanks to Gary Gregory. -o Make MethodParameters implement Iterable. Thanks to Gary Gregory. -o Make ParameterAnnotations implement Iterable. Thanks to Gary Gregory. -o Add Const.MAJOR_15 Thanks to Gary Gregory. -o Add Const.MAJOR_16 Thanks to Gary Gregory. -o Add Const.MAJOR_17 Thanks to Gary Gregory. -o Add Const.MAJOR_18 Thanks to Gary Gregory. -o Add Const.MAJOR_19 Thanks to Gary Gregory. -o Add Const.MINOR_15 Thanks to Gary Gregory. -o Add Const.MINOR_16 Thanks to Gary Gregory. -o Add Const.MINOR_17 Thanks to Gary Gregory. -o Add Const.MINOR_18 Thanks to Gary Gregory. -o Add Const.MINOR_19 Thanks to Gary Gregory. - -FIXED BUGS: -=========== - -o Improve test case coverage; fix Utility.encode bug #46. Thanks to Mark Roberts, Gary Gregory. -o BCEL-342: Migrate test suite to JUnit Jupiter #68. Thanks to Allon Murienik, Gary Gregory. -o BCEL-343: JUnit Assertion improvement #69. Thanks to Allon Murienik, Gary Gregory. -o Minor improvements to comments and toString() methods #71. Thanks to Mark Roberts. -o Minor Improvements #83. Thanks to Arturo Bernal. -o Inline variable and avoid unnecessary variable. #94. Thanks to Arturo Bernal. -o Formalize PerformanceTest #168. Thanks to Mark Roberts, Gary Gregory. -o Java 8 improvements #95. Thanks to Arturo Bernal. -o BCEL-345: Make documentation wording more inclusive #98. Thanks to Christine Poerschke. -o Force unsigned short for LineNumber.toString() #118. Thanks to Mark Roberts, Gary Gregory. -o Fix IllegalStateException when calling toString(ConstantPool) on a Module or ModuleRequires #125. Thanks to Tim Boudreau, Gary Gregory. -o Generate HTML in UTF-8 instead of whatever happens to be the default platform encoding. Thanks to Gary Gregory. -o BCEL-303: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-307: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-308: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-309: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-311: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-312: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-313: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o BCEL-337: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. -o Close resources #138. Thanks to Michael Ernst, Gary Gregory. -o Improve condy (constant dynamic) support #139. Thanks to Alexander Kriegisch, Gary Gregory. -o Fix typos #140. Thanks to Michael Ernst. -o BCEL-363: Enforce MAX_CP_ENTRIES in ConstantPoolGen and ConstantPool.dump #147. Thanks to Richard Atkins, Gary Gregory. -o Minor Changes #99. Thanks to Arturo Bernal, Gary Gregory. -o Simplify boolean expressions #152. Thanks to Arturo Bernal. -o Use Math.max #151. Thanks to Arturo Bernal. -o org.apache.bcel.classfile.Signature.translate(String) does not detect EOF correctly. Thanks to Gary Gregory. -o Fix SpotBugs [ERROR] High: Found reliance on default encoding in new org.apache.bcel.util.BCELifier(JavaClass, OutputStream): new java.io.PrintWriter(OutputStream) [org.apache.bcel.util.BCELifier] At BCELifier.java:[line 169] DM_DEFAULT_ENCODING. Thanks to Gary Gregory. -o Fix SpotBugs [ERROR] Medium: Unread field: org.apache.bcel.verifier.GraphicalVerifier.packFrame; should this field be static? [org.apache.bcel.verifier.GraphicalVerifier] At GraphicalVerifier.java:[line 43] SS_SHOULD_BE_STATIC. Thanks to Gary Gregory. -o Fix SpotBugs [ERROR] Medium: new org.apache.bcel.util.ModularRuntimeImage(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block [org.apache.bcel.util.ModularRuntimeImage] At ModularRuntimeImage.java:[line 68] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED. Thanks to Gary Gregory. - -CHANGES: -======== - -o Bump actions/cache from 2 to 3.0.10 #88, #93, #110, #119, #149, #154. Thanks to Dependabot, Gary Gregory. -o Bump actions/checkout from 2.3.1 to 3.1.0 #59, #66, #73, #108, #115, #153. Thanks to Dependabot, Gary Gregory. -o Bump actions/setup-java from 1.4.0 to 3.5.1 #62, #67. Thanks to Dependabot, Gary Gregory. -o Bump tests from Apache Commons Lang 3.10 to 3.12.0 Thanks to Gary Gregory. -o Bump commons-parent from 50 to 54. Thanks to Gary Gregory. -o Bump biz.aQute.bndlib from 5.1.0 to 6.3.1, #54, #72, #81, #111. Thanks to Dependabot, Gary Gregory. -o Bump maven-surefire-plugin from 3.0.0-M4 to 3.0.0-M7 #53, #124, #129. Thanks to Dependabot. -o Bump maven-checkstyle-plugin from 3.1.0 to 3.2.0, #77, #141. Thanks to Gary Gregory, Dependabot. -o Bump Jacoco from 0.8.5 to 0.8.8. Thanks to Dependabot, Gary Gregory. -o Bump commons-io from 2.7 to 2.11.0 #65, #96. Thanks to Dependabot, Gary Gregory. -o Bump exec-maven-plugin from 1.6.0 to 3.1.0 #51, #134. Thanks to Dependabot. -o Bump commons.japicmp.version from 0.14.3 to 0.16.0. Thanks to Gary Gregory. -o Bump maven-pmd-plugin from 3.13.0 to 3.19. #74, #103, #116, #130, #142, #144. Thanks to Dependabot. -o Bump pmd from 6.44.0 to 6.50.0. Thanks to Dependabot, Gary Gregory. -o Bump junit-jupiter from 5.7.0 to 5.9.1 #78, #90, #101, #112, #135. Thanks to Dependabot, Gary Gregory. -o Bump jna.version from 5.6.0 to 5.12.1 #84, #102, #109, #120, #131. Thanks to Dependabot. -o Bump jmh.version from 1.19 to 1.35 #92, #100, #122. Thanks to Dependabot. -o Bump maven-javadoc-plugin from 3.2.0 to 3.4.1. Thanks to Gary Gregory. -o Bump maven-bundle-plugin from 5.1.1 to 5.1.8. Thanks to Gary Gregory. -o Bump taglist-maven-plugin from 2.4 to 3.0.0 #114. Thanks to Dependabot. -o Bump spotbugs-maven-plugin from 4.5.3.0 to 4.7.2.1 #128, #132, #136, #144, #155. Thanks to Gary Gregory, Dependabot. -o Bump spotbugs from 4.5.3 to 4.7.1. Thanks to Gary Gregory. +New Features +------------- + +* Add github/codeql-action. +* Make Annotations implement Iterable. Thanks to Gary Gregory. +* Make BootstrapMethods implement Iterable. Thanks to Gary Gregory. +* Make ConstantPool implement Iterable. Thanks to Gary Gregory. +* Make InnerClasses implement Iterable. Thanks to Gary Gregory. +* Make LineNumberTable implement Iterable. Thanks to Gary Gregory. +* Make LocalVariableTable implement Iterable. Thanks to Gary Gregory. +* Make LocalVariableTypeTable implement Iterable. Thanks to Gary Gregory. +* Make MethodParameters implement Iterable. Thanks to Gary Gregory. +* Make ParameterAnnotations implement Iterable. Thanks to Gary Gregory. +* Add Const.MAJOR_15 Thanks to Gary Gregory. +* Add Const.MAJOR_16 Thanks to Gary Gregory. +* Add Const.MAJOR_17 Thanks to Gary Gregory. +* Add Const.MAJOR_18 Thanks to Gary Gregory. +* Add Const.MAJOR_19 Thanks to Gary Gregory. +* Add Const.MINOR_15 Thanks to Gary Gregory. +* Add Const.MINOR_16 Thanks to Gary Gregory. +* Add Const.MINOR_17 Thanks to Gary Gregory. +* Add Const.MINOR_18 Thanks to Gary Gregory. +* Add Const.MINOR_19 Thanks to Gary Gregory. + +Fixed Bugs +----------- + +* Improve test case coverage; fix Utility.encode bug #46. Thanks to Mark Roberts, Gary Gregory. +* BCEL-342: Migrate test suite to JUnit Jupiter #68. Thanks to Allon Murienik, Gary Gregory. +* BCEL-343: JUnit Assertion improvement #69. Thanks to Allon Murienik, Gary Gregory. +* Minor improvements to comments and toString() methods #71. Thanks to Mark Roberts. +* Minor Improvements #83. Thanks to Arturo Bernal. +* Inline variable and avoid unnecessary variable. #94. Thanks to Arturo Bernal. +* Formalize PerformanceTest #168. Thanks to Mark Roberts, Gary Gregory. +* Java 8 improvements #95. Thanks to Arturo Bernal. +* BCEL-345: Make documentation wording more inclusive #98. Thanks to Christine Poerschke. +* Force unsigned short for LineNumber.toString() #118. Thanks to Mark Roberts, Gary Gregory. +* Fix IllegalStateException when calling toString(ConstantPool) on a Module or ModuleRequires #125. Thanks to Tim Boudreau, Gary Gregory. +* Generate HTML in UTF-8 instead of whatever happens to be the default platform encoding. Thanks to Gary Gregory. +* BCEL-303: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-307: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-308: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-309: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-311: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-312: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-313: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* BCEL-337: Several fixes to the verifier #117. Thanks to Mark Roberts, Gary Gregory. +* Close resources #138. Thanks to Michael Ernst, Gary Gregory. +* Improve condy (constant dynamic) support #139. Thanks to Alexander Kriegisch, Gary Gregory. +* Fix typos #140. Thanks to Michael Ernst. +* BCEL-363: Enforce MAX_CP_ENTRIES in ConstantPoolGen and ConstantPool.dump #147. Thanks to Richard Atkins, Gary Gregory. +* Minor Changes #99. Thanks to Arturo Bernal, Gary Gregory. +* Simplify boolean expressions #152. Thanks to Arturo Bernal. +* Use Math.max #151. Thanks to Arturo Bernal. +* org.apache.bcel.classfile.Signature.translate(String) does not detect EOF correctly. Thanks to Gary Gregory. +* Fix SpotBugs [ERROR] High: Found reliance on default encoding in new org.apache.bcel.util.BCELifier(JavaClass, OutputStream): new java.io.PrintWriter(OutputStream) [org.apache.bcel.util.BCELifier] At BCELifier.java:[line 169] DM_DEFAULT_ENCODING. Thanks to Gary Gregory. +* Fix SpotBugs [ERROR] Medium: Unread field: org.apache.bcel.verifier.GraphicalVerifier.packFrame; should this field be static? [org.apache.bcel.verifier.GraphicalVerifier] At GraphicalVerifier.java:[line 43] SS_SHOULD_BE_STATIC. Thanks to Gary Gregory. +* Fix SpotBugs [ERROR] Medium: new org.apache.bcel.util.ModularRuntimeImage(String) creates a java.net.URLClassLoader classloader, which should be performed within a doPrivileged block [org.apache.bcel.util.ModularRuntimeImage] At ModularRuntimeImage.java:[line 68] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED. Thanks to Gary Gregory. + +Changes +-------- + +* Bump actions/cache from 2 to 3.0.10 #88, #93, #110, #119, #149, #154. Thanks to Dependabot, Gary Gregory. +* Bump actions/checkout from 2.3.1 to 3.1.0 #59, #66, #73, #108, #115, #153. Thanks to Dependabot, Gary Gregory. +* Bump actions/setup-java from 1.4.0 to 3.5.1 #62, #67. Thanks to Dependabot, Gary Gregory. +* Bump tests from Apache Commons Lang 3.10 to 3.12.0 Thanks to Gary Gregory. +* Bump commons-parent from 50 to 54. Thanks to Gary Gregory. +* Bump biz.aQute.bndlib from 5.1.0 to 6.3.1, #54, #72, #81, #111. Thanks to Dependabot, Gary Gregory. +* Bump maven-surefire-plugin from 3.0.0-M4 to 3.0.0-M7 #53, #124, #129. Thanks to Dependabot. +* Bump maven-checkstyle-plugin from 3.1.0 to 3.2.0, #77, #141. Thanks to Gary Gregory, Dependabot. +* Bump Jacoco from 0.8.5 to 0.8.8. Thanks to Dependabot, Gary Gregory. +* Bump commons-io from 2.7 to 2.11.0 #65, #96. Thanks to Dependabot, Gary Gregory. +* Bump exec-maven-plugin from 1.6.0 to 3.1.0 #51, #134. Thanks to Dependabot. +* Bump commons.japicmp.version from 0.14.3 to 0.16.0. Thanks to Gary Gregory. +* Bump maven-pmd-plugin from 3.13.0 to 3.19. #74, #103, #116, #130, #142, #144. Thanks to Dependabot. +* Bump pmd from 6.44.0 to 6.50.0. Thanks to Dependabot, Gary Gregory. +* Bump junit-jupiter from 5.7.0 to 5.9.1 #78, #90, #101, #112, #135. Thanks to Dependabot, Gary Gregory. +* Bump jna.version from 5.6.0 to 5.12.1 #84, #102, #109, #120, #131. Thanks to Dependabot. +* Bump jmh.version from 1.19 to 1.35 #92, #100, #122. Thanks to Dependabot. +* Bump maven-javadoc-plugin from 3.2.0 to 3.4.1. Thanks to Gary Gregory. +* Bump maven-bundle-plugin from 5.1.1 to 5.1.8. Thanks to Gary Gregory. +* Bump taglist-maven-plugin from 2.4 to 3.0.0 #114. Thanks to Dependabot. +* Bump spotbugs-maven-plugin from 4.5.3.0 to 4.7.2.1 #128, #132, #136, #144, #155. Thanks to Gary Gregory, Dependabot. +* Bump spotbugs from 4.5.3 to 4.7.1. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -460,13 +606,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.5.0 - RELEASE NOTES - +Apache Commons BCEL +Version 6.5.0 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.5.0! @@ -477,32 +623,32 @@ class: methods, fields and byte code instructions. Minor feature and bug fix release. -FIXED BUGS: -=========== - -o BCEL-329: MethodGen duplicates some attributes. Thanks to Gary Gregory, Mark Roberts. - -CHANGES: -======== - -o BCEL-330: Remove unnecessary references to Constants. Thanks to Mark Roberts. -o BCEL-336: MethodGen throws NullPointerException upon Invalid Class File Missing Constructor Body. Thanks to Tomo Suzuki, Gary Gregory. -o Improve documentation of Pass3bVerifier (#37). Thanks to Michael Ernst. -o Replaced deprecated constants in examples (#38). Thanks to Arthur Kupriyanov. -o Update tests from JNA 5.4.0 to 5.5.0. Thanks to Gary Gregory. -o Update tests JUnit from 4.12 to 4.13. Thanks to Gary Gregory. -o Update tests from Apache Commons Lang 3.9 to 3.10. Thanks to Gary Gregory. -o Update build maven-pmd-plugin 3.12.0 -> 3.13.0. Thanks to Gary Gregory. -o Update tests maven-surefire-plugin 3.0.0-M3 -> 3.0.0-M4. Thanks to Gary Gregory. -o Update build japicmp-maven-plugin 0.14.1 -> 0.14.3. Thanks to Gary Gregory. -o Update build jacoco-maven-plugin 0.8.4 -> 0.8.5. Thanks to Gary Gregory. -o Update tests from commons-io:commons-io 2.6 to 2.7. Thanks to Gary Gregory. -o Add support for invokestatic of an InterfaceMethodref #39. Thanks to Mark Roberts. -o Add attribute name(s) to Code.toString() #40. Thanks to Mark Roberts. -o BCEL-338: org.apache.bcel.generic.InstructionFactory.createInvoke() populates its internal ConstantPoolGen on bad input, then throws exception. Thanks to Gary Gregory. -o BCEL-339: Throw IllegalArgumentException, IllegalStateException, UnsupportedOperationException instead of RuntimeException. Thanks to Gary Gregory. -o Make some annotation methods public (#45). Thanks to Mark Roberts. -o Fix ConcurrentModificationException in the maven-bundle-plugin:4.2.1:manifest on Java 15-ea. Thanks to Gary Gregory. +Fixed Bugs +----------- + +* BCEL-329: MethodGen duplicates some attributes. Thanks to Gary Gregory, Mark Roberts. + +Changes +-------- + +* BCEL-330: Remove unnecessary references to Constants. Thanks to Mark Roberts. +* BCEL-336: MethodGen throws NullPointerException upon Invalid Class File Missing Constructor Body. Thanks to Tomo Suzuki, Gary Gregory. +* Improve documentation of Pass3bVerifier (#37). Thanks to Michael Ernst. +* Replaced deprecated constants in examples (#38). Thanks to Arthur Kupriyanov. +* Update tests from JNA 5.4.0 to 5.5.0. Thanks to Gary Gregory. +* Update tests JUnit from 4.12 to 4.13. Thanks to Gary Gregory. +* Update tests from Apache Commons Lang 3.9 to 3.10. Thanks to Gary Gregory. +* Update build maven-pmd-plugin 3.12.0 -> 3.13.0. Thanks to Gary Gregory. +* Update tests maven-surefire-plugin 3.0.0-M3 -> 3.0.0-M4. Thanks to Gary Gregory. +* Update build japicmp-maven-plugin 0.14.1 -> 0.14.3. Thanks to Gary Gregory. +* Update build jacoco-maven-plugin 0.8.4 -> 0.8.5. Thanks to Gary Gregory. +* Update tests from commons-io:commons-io 2.6 to 2.7. Thanks to Gary Gregory. +* Add support for invokestatic of an InterfaceMethodref #39. Thanks to Mark Roberts. +* Add attribute name(s) to Code.toString() #40. Thanks to Mark Roberts. +* BCEL-338: org.apache.bcel.generic.InstructionFactory.createInvoke() populates its internal ConstantPoolGen on bad input, then throws exception. Thanks to Gary Gregory. +* BCEL-339: Throw IllegalArgumentException, IllegalStateException, UnsupportedOperationException instead of RuntimeException. Thanks to Gary Gregory. +* Make some annotation methods public (#45). Thanks to Mark Roberts. +* Fix ConcurrentModificationException in the maven-bundle-plugin:4.2.1:manifest on Java 15-ea. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcel/changes-report.html @@ -534,13 +680,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.4.1 - RELEASE NOTES - +Apache Commons BCEL +Version 6.4.1 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.4.1! @@ -551,15 +697,15 @@ class: methods, fields and byte code instructions. Bug fix release. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-328: java.util.EmptyStackException at org.apache.bcel.classfile.DescendingVisitor.visitModule (DescendingVisitor.java:592). Thanks to Gary Gregory, Mark Roberts. +* BCEL-328: java.util.EmptyStackException at org.apache.bcel.classfile.DescendingVisitor.visitModule (DescendingVisitor.java:592). Thanks to Gary Gregory, Mark Roberts. -CHANGES: -======== +Changes +-------- -o Update build from Checkstyle Maven Plugin 3.0.0 to 3.1.0. Thanks to Gary Gregory. +* Update build from Checkstyle Maven Plugin 3.0.0 to 3.1.0. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -591,13 +737,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.4.0 - RELEASE NOTES - +Apache Commons BCEL +Version 6.4.0 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.4.0! @@ -608,32 +754,32 @@ class: methods, fields and byte code instructions. Feature and bug fix release. -NEW FEATURES: -============= +New Features +------------- -o BCEL-318: Add method org.apache.bcel.classfile.ConstantUtf8.clearCache(). Thanks to Gary Gregory. -o BCEL-320: Add LruCacheClassPathRepository that can scan many JAR files without OutOfMemoryError. Thanks to Tomo Suzuki, Gary Gregory. -o BCEL-322: Add constants to org.apache.bcel.Const for Java 14. Thanks to Gary Gregory. -o BCEL-321: Refactor subclasses of ClassPathRepository for differences in underlying cache. Thanks to Tomo Suzuki. +* BCEL-318: Add method org.apache.bcel.classfile.ConstantUtf8.clearCache(). Thanks to Gary Gregory. +* BCEL-320: Add LruCacheClassPathRepository that can scan many JAR files without OutOfMemoryError. Thanks to Tomo Suzuki, Gary Gregory. +* BCEL-322: Add constants to org.apache.bcel.Const for Java 14. Thanks to Gary Gregory. +* BCEL-321: Refactor subclasses of ClassPathRepository for differences in underlying cache. Thanks to Tomo Suzuki. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-316: org.apache.bcel.classfile.Attribute class and subclasses should NOT log to the console by default. Thanks to Gary Gregory. -o BCEL-278: InvokeInstruction.toString(final ConstantPool cp) throws NoSuchElementException #11. Thanks to Valery Barysoky. -o BCEL-270: Calling toString(ConstantPool) on InvokeInstruction throws NullPointerException. Thanks to Alexandru-Constantin Bledea. -o BCEL-323: org.apache.bcel.util.BCELifier to set major and minor versions. Thanks to Tomo Suzuki. -o BCEL-326: Add missing Java 9 and Java 11 class file attributes. #33 Thanks to Mark Roberts. -o BCEL-325: ClassDumper crashes on a module-info.class. #33 Thanks to Mark Roberts. -o BCEL-327: Update signature scanning in Utility to support TypeParameters. #32 Thanks to Mark Roberts. +* BCEL-316: org.apache.bcel.classfile.Attribute class and subclasses should NOT log to the console by default. Thanks to Gary Gregory. +* BCEL-278: InvokeInstruction.toString(final ConstantPool cp) throws NoSuchElementException #11. Thanks to Valery Barysoky. +* BCEL-270: Calling toString(ConstantPool) on InvokeInstruction throws NullPointerException. Thanks to Alexandru-Constantin Bledea. +* BCEL-323: org.apache.bcel.util.BCELifier to set major and minor versions. Thanks to Tomo Suzuki. +* BCEL-326: Add missing Java 9 and Java 11 class file attributes. #33 Thanks to Mark Roberts. +* BCEL-325: ClassDumper crashes on a module-info.class. #33 Thanks to Mark Roberts. +* BCEL-327: Update signature scanning in Utility to support TypeParameters. #32 Thanks to Mark Roberts. -CHANGES: -======== +Changes +-------- -o BCEL-317: Pluggable cache for ConstantUtf8. Thanks to Tomo Suzuki, Gary Gregory. -o BCEL-299: Fix example src/examples/ClassDumper.java ClassDumper.processID(). Thanks to Gary Gregory, zhangminglei. -o Update tests from JNA 4.5.0 to 5.3.1. Thanks to Gary Gregory. -o Update tests from JNA 5.3.1. to 5.4.0. Thanks to Gary Gregory. +* BCEL-317: Pluggable cache for ConstantUtf8. Thanks to Tomo Suzuki, Gary Gregory. +* BCEL-299: Fix example src/examples/ClassDumper.java ClassDumper.processID(). Thanks to Gary Gregory, zhangminglei. +* Update tests from JNA 4.5.0 to 5.3.1. Thanks to Gary Gregory. +* Update tests from JNA 5.3.1. to 5.4.0. Thanks to Gary Gregory. Historical list of changes: https://commons.apache.org/proper/commons-bcelchanges-report.html @@ -666,13 +812,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.3.1 - RELEASE NOTES - +Apache Commons BCEL +Version 6.3.1 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.3.1! @@ -683,17 +829,17 @@ class: methods, fields and byte code instructions. Bug fix release -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-267: Race conditions on static fields in BranchHandle and InstructionHandle. Thanks to Stephan Herrmann, Sebb, Gary Gregory, Torsten Curdt. -o BCEL-297: Possible NPE in override implementation of Object.equals (#20) Thanks to Mark Roberts, mingleizhang. -o BCEL-315: NullPointerException at org.apache.bcel.classfile.FieldOrMethod.dump(). Thanks to Gary Gregory. +* BCEL-267: Race conditions on static fields in BranchHandle and InstructionHandle. Thanks to Stephan Herrmann, Sebb, Gary Gregory, Torsten Curdt. +* BCEL-297: Possible NPE in override implementation of Object.equals (#20) Thanks to Mark Roberts, mingleizhang. +* BCEL-315: NullPointerException at org.apache.bcel.classfile.FieldOrMethod.dump(). Thanks to Gary Gregory. -CHANGES: -======== +Changes +-------- -o BCEL-298: Add some files to .gitignore (#19) Thanks to mingleizhang. +* BCEL-298: Add some files to .gitignore (#19) Thanks to mingleizhang. @@ -717,13 +863,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.3 - RELEASE NOTES +Apache Commons BCEL +Version 6.3 +RELEASE NOTES -INTRODUCTION: - +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.3! @@ -733,25 +879,25 @@ represented by objects containing all the symbolic information of the given class: methods, fields and byte code instructions. -NEW FEATURES: -============= +New Features +------------- -o Added org.apache.bcel.classfile.Visitor.visitConstantDynamic(ConstantDynamic) Thanks to Mark Thomas. -o Added org.apache.bcel.classfile.ConstantDynamic Thanks to Mark Thomas. -o Added fields in org.apache.bcel.Const for Java 9, 10, and 11. Thanks to Mark Thomas. -o Added fields in org.apache.bcel.Const for Java 12 and 13 based on Java Early Access releases. Thanks to Mark Thomas. +* Added org.apache.bcel.classfile.Visitor.visitConstantDynamic(ConstantDynamic) Thanks to Mark Thomas. +* Added org.apache.bcel.classfile.ConstantDynamic Thanks to Mark Thomas. +* Added fields in org.apache.bcel.Const for Java 9, 10, and 11. Thanks to Mark Thomas. +* Added fields in org.apache.bcel.Const for Java 12 and 13 based on Java Early Access releases. Thanks to Mark Thomas. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-304: ClassPath.getClassFile() and friends do not work with JDK 9 and higher (PR #22.) Thanks to Gary Gregory, Ed Pavlak. -o BCEL-305: ClassPath.getClassFile() and friends do not work with JRE 9 and higher Thanks to Gary Gregory. +* BCEL-304: ClassPath.getClassFile() and friends do not work with JDK 9 and higher (PR #22.) Thanks to Gary Gregory, Ed Pavlak. +* BCEL-305: ClassPath.getClassFile() and friends do not work with JRE 9 and higher Thanks to Gary Gregory. -CHANGES: -======== +Changes +-------- -o Initial support for Java 11 Thanks to Mark Thomas, Gary Gregory. -o Update Java requirement from Java 7 to Java 8. Thanks to Gary Gregory. +* Initial support for Java 11 Thanks to Mark Thomas, Gary Gregory. +* Update Java requirement from Java 7 to Java 8. Thanks to Gary Gregory. @@ -775,13 +921,13 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.2 - RELEASE NOTES - +Apache Commons BCEL +Version 6.2 +RELEASE NOTES -INTRODUCTION: +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.2! @@ -792,14 +938,14 @@ class: methods, fields and byte code instructions. Experimental Java 9 Support -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-294: Incorrect comment in StackMap.java Thanks to Mark Roberts. -o BCEL-296: Incorrect comment in several classes. Thanks to Mark Roberts. -o BCEL-295: Fix local variable live range length; add test case. Thanks to Mark Roberts. -o BCEL-300: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19. -o BCEL-301: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 20. +* BCEL-294: Incorrect comment in StackMap.java Thanks to Mark Roberts. +* BCEL-296: Incorrect comment in several classes. Thanks to Mark Roberts. +* BCEL-295: Fix local variable live range length; add test case. Thanks to Mark Roberts. +* BCEL-300: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19. +* BCEL-301: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 20. Have fun! @@ -822,12 +968,12 @@ The Apache Commons Team ----------------------------------------------------------------------------- - Apache Commons BCEL - Version 6.1 - RELEASE NOTES +Apache Commons BCEL + Version 6.1 + RELEASE NOTES -INTRODUCTION: +Introduction The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.1! @@ -844,7 +990,7 @@ It requires Java 7 or higher to run. COMPATIBILITY with 6.1 -====================== +---------------------- Binary compatible - Yes @@ -865,7 +1011,7 @@ https://commons.apache.org/bcel/clirr-report.html COMPATIBILITY with Java 9 -========================= +------------------------- The MANIFEST.MF now contains an additional entry: @@ -883,25 +1029,25 @@ are still working on this. For more information see: https://issues.apache.org/jira/browse/BCEL-275 -NEW FEATURES: -============= +New Features +------------- -o BCEL-293: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility. -o BCEL-292: Add minimal Java 9 support. +* BCEL-293: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility. +* BCEL-292: Add minimal Java 9 support. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-286: Utility.signatureToString fails if a method has multiple type +* BCEL-286: Utility.signatureToString fails if a method has multiple type arguments. Thanks to Mark Roberts. -o BCEL-287: IINC does not handle -128 properly. Thanks to Mark Roberts. -o BCEL-283: Support for StackMap should be different from StackMapTable. +* BCEL-287: IINC does not handle -128 properly. Thanks to Mark Roberts. +* BCEL-283: Support for StackMap should be different from StackMapTable. Thanks to Mark Roberts. -o BCEL-289: Crash when parsing constructor of inner classes with parameters +* BCEL-289: Crash when parsing constructor of inner classes with parameters annotated. -o BCEL-276: LocalVariableTypeTable is not updated. +* BCEL-276: LocalVariableTypeTable is not updated. Thanks to Sam Yoon, Mark Roberts. -o BCEL-277: Resolving the String representation of a constant throws +* BCEL-277: Resolving the String representation of a constant throws NoSuchElementException in case of CONSTANT_NameAndType constant. Thanks to Sam Yoon. @@ -911,11 +1057,11 @@ Have fun! ----------------------------------------------------------------------------- - Release Notes for 6.0 +Release Notes for 6.0 -INTRODUCTION: - +Introduction +------------ The Apache Commons BCEL team is pleased to announce the release of Apache Commons BCEL 6.0! @@ -931,7 +1077,7 @@ It requires Java 7 or higher to run. COMPATIBILITY with 5.2 -====================== +---------------------- Binary compatible - not strictly compatible - The constant interface org.apache.bcel.Constants has been deprecated. Classes @@ -964,169 +1110,169 @@ For full information about API changes please see the extended Clirr report: https://commons.apache.org/bcel/clirr-report.html -NEW FEATURES: -============= +New Features +------------- -o BCEL-272: Add constants for Java 9 class file version 53. +* BCEL-272: Add constants for Java 9 class file version 53. -FIXED BUGS: -=========== +Fixed Bugs +----------- -o BCEL-237: non-empty final arrays should be private as they are mutable. -o BCEL-243: Type.getType() needs to understand TypeVariableSignature(s). -o BCEL-271: FCONST pattern does not include FCONST_2. -o BCEL-264: Add missing Node.accept() implementations (ConstantMethodHandle, +* BCEL-237: non-empty final arrays should be private as they are mutable. +* BCEL-243: Type.getType() needs to understand TypeVariableSignature(s). +* BCEL-271: FCONST pattern does not include FCONST_2. +* BCEL-264: Add missing Node.accept() implementations (ConstantMethodHandle, ConstantMethodType, ParameterAnnotationEntry). -o BCEL-221: BCELifier is not working for Java8Example (incomplete). -o BCEL-195: Addition of hashCode() to generic/Instruction.java breaks Targeters. +* BCEL-221: BCELifier is not working for Java8Example (incomplete). +* BCEL-195: Addition of hashCode() to generic/Instruction.java breaks Targeters. Never make distinct BranchInstructions compare equal. -o BCEL-261: Select constructor allows partially constructed instance to escape. +* BCEL-261: Select constructor allows partially constructed instance to escape. Re-ordered code to delay the escape. -o BCEL-259: Minor doc error in BranchInstruction.java. -o BCEL-260: ClassDumper example duplicates field attribute types. -o BCEL-258: No tests to check the output of dump methods. -o BCEL-257: INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL need to define dump() +* BCEL-259: Minor doc error in BranchInstruction.java. +* BCEL-260: ClassDumper example duplicates field attribute types. +* BCEL-258: No tests to check the output of dump methods. +* BCEL-257: INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL need to define dump() methods. -o BCEL-254: Two more methods that would be nice to be public. -o BCEL-245: Type class includes constants that reference subclasses. -o BCEL-253: Pass 3b verifier is too strict. -o BCEL-248: StackMapTable[Entry] should be removed and improvements merged into +* BCEL-254: Two more methods that would be nice to be public. +* BCEL-245: Type class includes constants that reference subclasses. +* BCEL-253: Pass 3b verifier is too strict. +* BCEL-248: StackMapTable[Entry] should be removed and improvements merged into StackMap[Entry]. -o BCEL-202: StackMap[Table]Entry.copy() needs to be deep; Improved support for +* BCEL-202: StackMap[Table]Entry.copy() needs to be deep; Improved support for StackMaps. -o BCEL-251: Pass3aVerifier visitANEWARRAY() does not allow 255 array dimensions. -o BCEL-249: Check for max Short seems wrong. -o BCEL-208: Need to check for an empty InstructionList. -o BCEL-217: long type instructions are not searched by InstructionFinder using +* BCEL-251: Pass3aVerifier visitANEWARRAY() does not allow 255 array dimensions. +* BCEL-249: Check for max Short seems wrong. +* BCEL-208: Need to check for an empty InstructionList. +* BCEL-217: long type instructions are not searched by InstructionFinder using regular expression. -o BCEL-239: Interfaces should not be used to define constants. -o BCEL-234: Code must not swallow Throwable. -o BCEL-209: Bug fixes and improvements to InvokeDynamic and BootStrapMethods +* BCEL-239: Interfaces should not be used to define constants. +* BCEL-234: Code must not swallow Throwable. +* BCEL-209: Bug fixes and improvements to InvokeDynamic and BootStrapMethods implementation. Thanks to Mark Roberts. -o BCEL-187: Verification error when an invoke references a method defined in +* BCEL-187: Verification error when an invoke references a method defined in superclass. Thanks to Jérôme Leroux. -o BCEL-218: Remove ObjectType cache. Thanks to chas. -o BCEL-184: The verifier now checks if methods with a void return type attempt +* BCEL-218: Remove ObjectType cache. Thanks to chas. +* BCEL-184: The verifier now checks if methods with a void return type attempt to return an object. Thanks to Jérôme Leroux. -o BCEL-207: MethodGen.removeLocalVariable now properly unreference the removed +* BCEL-207: MethodGen.removeLocalVariable now properly unreference the removed variable from the targetters of the instruction handlers delimiting the scope of the variable. Thanks to Mark Roberts. -o BCEL-197: Utility.signatureToString() no longer throws a ClassFormatException +* BCEL-197: Utility.signatureToString() no longer throws a ClassFormatException on TypeVariables found in generic signatures. Thanks to Mark Roberts. -o BCEL-194: Removed the 'index' variable from the LocalVariableGen's hash code. Thanks to Mark Roberts. -o BCEL-193: The verifier should not check for run time compatibility of objects +* BCEL-194: Removed the 'index' variable from the LocalVariableGen's hash code. Thanks to Mark Roberts. +* BCEL-193: The verifier should not check for run time compatibility of objects assigned to arrays. Thanks to Jérôme Leroux. -o BCEL-188: Correct verification of the return value of a method. Thanks to Jérôme Leroux. -o BCEL-186: Performance degradation with the UTF8 cache. getInstance no longer +* BCEL-188: Correct verification of the return value of a method. Thanks to Jérôme Leroux. +* BCEL-186: Performance degradation with the UTF8 cache. getInstance no longer uses cache. -o BCEL-181: org.apache.bcel.util.ClassLoaderRepository.loadClass(String) leaks +* BCEL-181: org.apache.bcel.util.ClassLoaderRepository.loadClass(String) leaks input streams. -o BCEL-28: Mistake in "Peephole optimizer" example +* BCEL-28: Mistake in "Peephole optimizer" example at https://commons.apache.org/bcel/manual.html -o BCEL-74: BCEL cannot be used as java.system.class.loader. -o BCEL-77: XSLT transforms broken in Turkish Locale. -o BCEL-79: java.lang.ClassFormatError: LVTT entry for 'local' in class file +* BCEL-74: BCEL cannot be used as java.system.class.loader. +* BCEL-77: XSLT transforms broken in Turkish Locale. +* BCEL-79: java.lang.ClassFormatError: LVTT entry for 'local' in class file org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT entry -o BCEL-81: ClassParser.parse() throws NullPointerException if class does not +* BCEL-81: ClassParser.parse() throws NullPointerException if class does not exist and ClassParser(String) constructor is used. -o BCEL-85: ArrayOutOfBoundsException in InstructionFinder. -o BCEL-87: Website: Incorrect URL for source; version 5.2 is not in the bug +* BCEL-85: ArrayOutOfBoundsException in InstructionFinder. +* BCEL-87: Website: Incorrect URL for source; version 5.2 is not in the bug page -o BCEL-88: bcelified method doesn't pass verification. -o BCEL-89: return type not verified by JustIce. -o BCEL-94: @since tag incorrect for Annotation classes in BCEL trunk. -o BCEL-95: InstructionFactory missing % operator for Float, Double. -o BCEL-96: Fields in Annotations and AnnotationEntry are inaccessible to +* BCEL-88: bcelified method doesn't pass verification. +* BCEL-89: return type not verified by JustIce. +* BCEL-94: @since tag incorrect for Annotation classes in BCEL trunk. +* BCEL-95: InstructionFactory missing % operator for Float, Double. +* BCEL-96: Fields in Annotations and AnnotationEntry are inaccessible to subclasses -o BCEL-97: Add support for getResources to ClassPath. -o BCEL-98: Two source files in repository are empty. -o BCEL-99: Maven POM file calls in apache regex but code does not use it. -o BCEL-100: ClassParser throws unintelligible Exception. -o BCEL-101: verifier raises an AssertionViolatedException when done against +* BCEL-97: Add support for getResources to ClassPath. +* BCEL-98: Two source files in repository are empty. +* BCEL-99: Maven POM file calls in apache regex but code does not use it. +* BCEL-100: ClassParser throws unintelligible Exception. +* BCEL-101: verifier raises an AssertionViolatedException when done against Java 5 files with generics/annotations. -o BCEL-102: Verifier fails in pass 2 with "Number of LocalVariableTable +* BCEL-102: Verifier fails in pass 2 with "Number of LocalVariableTable attributes of Code attribute" on static methods. -o BCEL-107: ParameterAnnotationEntries are read not dumped. -o BCEL-108: RuntimeVisible Annotations duplicated. -o BCEL-112: ARRAYLENGTH incorrectly not StackConsumer. -o BCEL-114: Error in method search() defined in +* BCEL-107: ParameterAnnotationEntries are read not dumped. +* BCEL-108: RuntimeVisible Annotations duplicated. +* BCEL-112: ARRAYLENGTH incorrectly not StackConsumer. +* BCEL-114: Error in method search() defined in org.apache.bcel.util.InstructionFinder -o BCEL-115: Deleting all instructions of a list shows wrong behavior. -o BCEL-120: Make BCEL JAR OSGi compatible. -o BCEL-122: ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile. -o BCEL-124: tableswitch/lookupswitch invalid alignment of 4-byte operands. -o BCEL-125: Incorrect size calculation in InstructionFinder. -o BCEL-130: Class files containing "ParameterAnnotations" are dumped +* BCEL-115: Deleting all instructions of a list shows wrong behavior. +* BCEL-120: Make BCEL JAR OSGi compatible. +* BCEL-122: ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile. +* BCEL-124: tableswitch/lookupswitch invalid alignment of 4-byte operands. +* BCEL-125: Incorrect size calculation in InstructionFinder. +* BCEL-130: Class files containing "ParameterAnnotations" are dumped incorrectly. -o BCEL-131: Class files containing "StackMapTable" attributes (on method code) +* BCEL-131: Class files containing "StackMapTable" attributes (on method code) are dumped incorrectly. -o BCEL-132: org.apache.bcel.classfile.ClassParser: NullPointerException caused +* BCEL-132: org.apache.bcel.classfile.ClassParser: NullPointerException caused by fileopen failed. -o BCEL-133: org.apache.bcel.classfile.ClassParser: NullPointerException caused +* BCEL-133: org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename. -o BCEL-134: ExecutionVisitor doesn't support Class constant type for LDC and +* BCEL-134: ExecutionVisitor doesn't support Class constant type for LDC and LDC_W. -o BCEL-135: BCELifier issue: BCELFactory fails to handle float and long +* BCEL-135: BCELifier issue: BCELFactory fails to handle float and long constants. -o BCEL-137: "Invalid method signature: TT;" when using MethodGen for a method +* BCEL-137: "Invalid method signature: TT;" when using MethodGen for a method having a generic parameter. -o BCEL-138: FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize() +* BCEL-138: FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize() output. -o BCEL-140: org.apache.bcel.generic.Instruction.equals(Object) does not follow +* BCEL-140: org.apache.bcel.generic.Instruction.equals(Object) does not follow Object.equals(Object) rules. -o BCEL-141: Select instructions should implement StackConsumer instead of +* BCEL-141: Select instructions should implement StackConsumer instead of StackProducer. -o BCEL-143: Fix CPL License issues with EnclosingMethod.java and +* BCEL-143: Fix CPL License issues with EnclosingMethod.java and LocalVariableTypeTable.java. -o BCEL-145: Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output. -o BCEL-146: SyntheticRepository.loadClass() fails to close the inputStream. -o BCEL-148: BCELifier produces incorrect code for methods containing loads of +* BCEL-145: Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output. +* BCEL-146: SyntheticRepository.loadClass() fails to close the inputStream. +* BCEL-148: BCELifier produces incorrect code for methods containing loads of class literals from constant pool. -o BCEL-151: Code attribute size not updated. -o BCEL-152: Incorrect link for Jasmin assembler language. -o BCEL-153: Examples not present in source or binary downloads. -o BCEL-154: ClassParser.parse() generates NPE if it cannot open the file. -o BCEL-155: InstConstraintVisitor does not handle class constants. -o BCEL-156: Pass3bVerifier crashes on empty methods. -o BCEL-159: LocalVariableGen.getLocalVariable() computes incorrect length. -o BCEL-164: Method does not have a method to access parameter annotations. -o BCEL-167: ClassPath.getResource does not correctly perform URL escaping. -o BCEL-173: ClassParser fails to parse JDK classes in Java 8: +* BCEL-151: Code attribute size not updated. +* BCEL-152: Incorrect link for Jasmin assembler language. +* BCEL-153: Examples not present in source or binary downloads. +* BCEL-154: ClassParser.parse() generates NPE if it cannot open the file. +* BCEL-155: InstConstraintVisitor does not handle class constants. +* BCEL-156: Pass3bVerifier crashes on empty methods. +* BCEL-159: LocalVariableGen.getLocalVariable() computes incorrect length. +* BCEL-164: Method does not have a method to access parameter annotations. +* BCEL-167: ClassPath.getResource does not correctly perform URL escaping. +* BCEL-173: ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool. -o BCEL-174: Verification of interfaces with default methods fails with Java 8. -o BCEL-177: When reading the number of parameters in a MethodParameters +* BCEL-174: Verification of interfaces with default methods fails with Java 8. +* BCEL-177: When reading the number of parameters in a MethodParameters structure only read a single byte as per the JVM specification. -CHANGES: -======== +Changes +-------- -o BCEL-262: InvokeInstruction.getClassName(ConstantPoolGen) should not throw +* BCEL-262: InvokeInstruction.getClassName(ConstantPoolGen) should not throw an exception when it detects an array. Thanks to Mark Roberts. -o BCEL-230: Document the Java platform requirement clearly and early. -o BCEL-211: Some additional clone methods should be public. -o BCEL-127: Document that Instruction Factory returns singleton instances. -o BCEL-198: better support for clone/copy methods. -o BCEL-201: modify several toString methods to make output similar to "javap". -o BCEL-205: add javadoc comments to LineNumber.java and LineNumberTable.java. -o BCEL-212: Inconsistent toString() results. -o BCEL-244: Update Java requirement from 5 to 7. -o BCEL-219: Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput) +* BCEL-230: Document the Java platform requirement clearly and early. +* BCEL-211: Some additional clone methods should be public. +* BCEL-127: Document that Instruction Factory returns singleton instances. +* BCEL-198: better support for clone/copy methods. +* BCEL-201: modify several toString methods to make output similar to "javap". +* BCEL-205: add javadoc comments to LineNumber.java and LineNumberTable.java. +* BCEL-212: Inconsistent toString() results. +* BCEL-244: Update Java requirement from 5 to 7. +* BCEL-219: Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput) public. Thanks to Maxim Degtyarev. -o BCEL-76: Add parent type processing for ClassPath class. -o BCEL-83: Add support for getResource and getResourceAsStream to ClassPath. -o BCEL-92: Properly parse StackMapTable attributes in Java 6 classfiles. -o BCEL-104: Javadoc overhaul. -o BCEL-119: BCEL is unnecessarily slow. -o BCEL-157: Add support for INVOKEDYNAMIC and MethodHandles. -o BCEL-160: Why using unstable sort at MethodGen.getLocalVariables() ? -o BCEL-163: Incorporate patch file from Findbugs. -o BCEL-175: Implement the MethodParameters attribute. - -REMOVED: -======== -o BCEL-242: Remove Serializable. -o BCEL-110: Problem with JAXB if the bcel classloader is used; remove the broken +* BCEL-76: Add parent type processing for ClassPath class. +* BCEL-83: Add support for getResource and getResourceAsStream to ClassPath. +* BCEL-92: Properly parse StackMapTable attributes in Java 6 classfiles. +* BCEL-104: Javadoc overhaul. +* BCEL-119: BCEL is unnecessarily slow. +* BCEL-157: Add support for INVOKEDYNAMIC and MethodHandles. +* BCEL-160: Why using unstable sort at MethodGen.getLocalVariables() ? +* BCEL-163: Incorporate patch file from Findbugs. +* BCEL-175: Implement the MethodParameters attribute. + +Removed +-------- +* BCEL-242: Remove Serializable. +* BCEL-110: Problem with JAXB if the bcel classloader is used; remove the broken ClassLoader class. diff --git a/docs/eps/classloader.fig b/docs/eps/classloader.fig index 729d774976..d8a9b38708 100644 --- a/docs/eps/classloader.fig +++ b/docs/eps/classloader.fig @@ -1,47 +1,47 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -6 900 450 3150 1125 -2 4 0 1 0 7 100 0 -1 0.000 0 0 7 0 0 5 - 3150 1125 3150 450 900 450 900 1125 3150 1125 -4 0 0 100 0 16 14 0.0000 4 165 1380 1350 900 Java class file\001 --6 -6 3600 450 5850 1125 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 3600 450 5850 450 5850 1125 3600 1125 3600 450 -4 0 0 100 0 16 14 0.0000 4 165 1215 4140 855 Class loader\001 --6 -6 6750 450 9000 1125 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 6750 450 9000 450 9000 1125 6750 1125 6750 450 -4 0 0 100 0 16 14 0.0000 4 210 1665 7020 855 Byte code verifier\001 --6 -6 9450 450 11700 1125 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 9450 450 11700 450 11700 1125 9450 1125 9450 450 -4 0 0 100 0 16 14 0.0000 4 210 1410 9900 900 Interpreter/JIT\001 --6 -6 4950 1575 7875 2700 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 4950 1575 7875 1575 7875 2700 4950 2700 4950 1575 -4 0 0 100 0 16 14 0.0000 4 210 2505 5175 2475 Byte code transformations\001 -4 0 0 100 0 14 14 0.0000 4 150 1215 5850 2025 JavaClass\001 --6 -2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 3150 765 3600 765 -2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 9000 765 9450 765 -2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 3 - 1 1 1.00 60.00 120.00 - 5850 765 6075 765 6075 1575 -2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 3 - 1 1 1.00 60.00 120.00 - 6525 1575 6525 765 6750 765 +#FIG 3.2 +Portrait +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 900 450 3150 1125 +2 4 0 1 0 7 100 0 -1 0.000 0 0 7 0 0 5 + 3150 1125 3150 450 900 450 900 1125 3150 1125 +4 0 0 100 0 16 14 0.0000 4 165 1380 1350 900 Java class file\001 +-6 +6 3600 450 5850 1125 +2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 + 3600 450 5850 450 5850 1125 3600 1125 3600 450 +4 0 0 100 0 16 14 0.0000 4 165 1215 4140 855 Class loader\001 +-6 +6 6750 450 9000 1125 +2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 + 6750 450 9000 450 9000 1125 6750 1125 6750 450 +4 0 0 100 0 16 14 0.0000 4 210 1665 7020 855 Byte code verifier\001 +-6 +6 9450 450 11700 1125 +2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 + 9450 450 11700 450 11700 1125 9450 1125 9450 450 +4 0 0 100 0 16 14 0.0000 4 210 1410 9900 900 Interpreter/JIT\001 +-6 +6 4950 1575 7875 2700 +2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 + 4950 1575 7875 1575 7875 2700 4950 2700 4950 1575 +4 0 0 100 0 16 14 0.0000 4 210 2505 5175 2475 Byte code transformations\001 +4 0 0 100 0 14 14 0.0000 4 150 1215 5850 2025 JavaClass\001 +-6 +2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 3150 765 3600 765 +2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 9000 765 9450 765 +2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 5850 765 6075 765 6075 1575 +2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 1 0 3 + 1 1 1.00 60.00 120.00 + 6525 1575 6525 765 6750 765 diff --git a/docs/verifier/V_API_SD.eps b/docs/verifier/V_API_SD.eps index ace1359ab5..7c44b7d22e 100644 --- a/docs/verifier/V_API_SD.eps +++ b/docs/verifier/V_API_SD.eps @@ -1,5 +1,5 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%BoundingBox: 6 6 1079 801 +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 6 6 1079 801 %%BeginProcSet: reencode 1.0 0 /RE { findfont begin @@ -36,8 +36,8 @@ xrad yrad scale 0 0 1 0 360 arc savematrix setmatrix end } def %%EndProcSet: ellipse 1.0 0 -%%EndProlog -%%BeginSetup +%%EndProlog +%%BeginSetup /isolatin1encoding [ 32 /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one @@ -62,2340 +62,2340 @@ savematrix setmatrix end } def /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] def -%%EndSetup -1 setlinewidth -isolatin1encoding /_Helvetica /Helvetica RE -/_Helvetica findfont -12 scalefont setfont -0.0 0.0 0.0 setrgbcolor -0 807 translate -1.0 1.0 1.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -10 -10 moveto -86 0 rlineto -0 -26 rlineto --86 0 rlineto -closepath -stroke -isolatin1encoding /_Helvetica /Helvetica RE -/_Helvetica findfont -9 scalefont setfont -newpath -21 -25 moveto -86 -25 lineto -stroke -21 -24 moveto -(firewall : Object) show -1.0 1.0 1.0 setrgbcolor -newpath -49 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -49 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -stroke -newpath -49 -796 moveto -58 -796 lineto -stroke -newpath -58 -796 moveto -49 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -72 moveto -20 0 rlineto -0 -679 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -72 moveto -20 0 rlineto -0 -679 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -72 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -72 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -112 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -112 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -152 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -152 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -232 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -232 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -272 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -272 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -43 -752 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -43 -752 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -157 -10 moveto -119 0 rlineto -0 -26 rlineto --119 0 rlineto -closepath -stroke -newpath -168 -25 moveto -266 -25 lineto -stroke -168 -24 moveto -(aClassToVerify : Class) show -1.0 1.0 1.0 setrgbcolor -newpath -213 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -213 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -stroke -newpath -213 -796 moveto -222 -796 lineto -stroke -newpath -222 -796 moveto -213 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -207 -72 moveto -20 0 rlineto -0 -39 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -207 -72 moveto -20 0 rlineto -0 -39 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -207 -72 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -207 -72 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -207 -112 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -207 -112 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -337 -10 moveto -118 0 rlineto -0 -26 rlineto --118 0 rlineto -closepath -stroke -newpath -348 -25 moveto -445 -25 lineto -stroke -348 -24 moveto -(theVF : VerifierFactory) show -1.0 1.0 1.0 setrgbcolor -newpath -392 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -392 -37 moveto -9 0 rlineto -0 -759 rlineto --9 0 rlineto -closepath -stroke -newpath -392 -796 moveto -401 -796 lineto -stroke -newpath -401 -796 moveto -392 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -386 -152 moveto -20 0 rlineto -0 -79 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -386 -152 moveto -20 0 rlineto -0 -79 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -386 -152 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -386 -152 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -386 -192 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -386 -192 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -386 -232 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -386 -232 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -562 -180 moveto -95 0 rlineto -0 -26 rlineto --95 0 rlineto -closepath -stroke -newpath -573 -195 moveto -647 -195 lineto -stroke -573 -194 moveto -(aVerifier : Verifier) show -1.0 1.0 1.0 setrgbcolor -newpath -606 -207 moveto -9 0 rlineto -0 -589 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -606 -207 moveto -9 0 rlineto -0 -589 rlineto --9 0 rlineto -closepath -stroke -newpath -606 -796 moveto -615 -796 lineto -stroke -newpath -615 -796 moveto -606 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -207 moveto -20 0 rlineto -0 -544 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -207 moveto -20 0 rlineto -0 -544 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -562 -190 moveto -95 0 rlineto -0 1 rlineto --95 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -562 -190 moveto -95 0 rlineto -0 1 rlineto --95 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -272 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -272 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -312 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -312 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -352 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -352 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -432 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -432 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -472 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -472 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -512 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -512 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -592 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -592 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -632 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -632 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -712 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -712 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -600 -752 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -600 -752 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -764 -300 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -newpath -775 -315 moveto -862 -315 lineto -stroke -775 -314 moveto -(aP2V : Pass2Verifier) show -1.0 1.0 1.0 setrgbcolor -newpath -814 -327 moveto -9 0 rlineto -0 -469 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -814 -327 moveto -9 0 rlineto -0 -469 rlineto --9 0 rlineto -closepath -stroke -newpath -814 -796 moveto -823 -796 lineto -stroke -newpath -823 -796 moveto -814 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -327 moveto -20 0 rlineto -0 -384 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -327 moveto -20 0 rlineto -0 -384 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -764 -310 moveto -108 0 rlineto -0 1 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -764 -310 moveto -108 0 rlineto -0 1 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -352 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -352 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -432 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -432 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -632 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -632 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -672 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -672 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -672 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -672 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -712 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -712 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -392 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -392 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -808 -392 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -808 -392 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -933 -460 moveto -108 0 rlineto -0 -26 rlineto --108 0 rlineto -closepath -stroke -newpath -944 -475 moveto -1031 -475 lineto -stroke -944 -474 moveto -(aP1V : Pass1Verifier) show -1.0 1.0 1.0 setrgbcolor -newpath -983 -487 moveto -9 0 rlineto -0 -309 rlineto --9 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -983 -487 moveto -9 0 rlineto -0 -309 rlineto --9 0 rlineto -closepath -stroke -newpath -983 -796 moveto -992 -796 lineto -stroke -newpath -992 -796 moveto -983 -796 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -977 -487 moveto -20 0 rlineto -0 -104 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -977 -487 moveto -20 0 rlineto -0 -104 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -933 -470 moveto -108 0 rlineto -0 1 rlineto --108 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -933 -470 moveto -108 0 rlineto -0 1 rlineto --108 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -977 -512 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -977 -512 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -977 -552 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -977 -552 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -977 -552 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -977 -552 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -1.0 1.0 1.0 setrgbcolor -newpath -977 -592 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -977 -592 moveto -20 0 rlineto -0 1 rlineto --20 0 rlineto -closepath -stroke -newpath -64 -72 moveto -207 -72 lineto -stroke -newpath -206 -72 moveto -194 -79 lineto -194 -65 lineto -closepath -eofill -newpath -206 -72 moveto -194 -79 lineto -194 -65 lineto -closepath -stroke -73 -68 moveto -( : getName\(\)) show -newpath -207 -112 moveto -202 -112 lineto -stroke -newpath -197 -112 moveto -192 -112 lineto -stroke -newpath -187 -112 moveto -182 -112 lineto -stroke -newpath -177 -112 moveto -172 -112 lineto -stroke -newpath -167 -112 moveto -162 -112 lineto -stroke -newpath -157 -112 moveto -152 -112 lineto -stroke -newpath -147 -112 moveto -142 -112 lineto -stroke -newpath -137 -112 moveto -132 -112 lineto -stroke -newpath -127 -112 moveto -122 -112 lineto -stroke -newpath -117 -112 moveto -112 -112 lineto -stroke -newpath -107 -112 moveto -102 -112 lineto -stroke -newpath -97 -112 moveto -92 -112 lineto -stroke -newpath -87 -112 moveto -82 -112 lineto -stroke -newpath -77 -112 moveto -72 -112 lineto -stroke -newpath -67 -112 moveto -64 -112 lineto -stroke -newpath -77 -105 moveto -65 -112 lineto -stroke -newpath -77 -119 moveto -65 -112 lineto -stroke -156 -128 moveto -( : name) show -newpath -64 -152 moveto -386 -152 lineto -stroke -newpath -385 -152 moveto -373 -159 lineto -373 -145 lineto -closepath -eofill -newpath -385 -152 moveto -373 -159 lineto -373 -145 lineto -closepath -stroke -104 -148 moveto -( : getVerifier\(name\)) show -newpath -407 -192 moveto -560 -192 lineto -562 -190 lineto -stroke -newpath -561 -191 moveto -550 -200 lineto -547 -186 lineto -closepath -eofill -newpath -561 -191 moveto -550 -200 lineto -547 -186 lineto -closepath -stroke -396 -188 moveto -( : create_if_not_cached) show -newpath -386 -232 moveto -381 -232 lineto -stroke -newpath -376 -232 moveto -371 -232 lineto -stroke -newpath -366 -232 moveto -361 -232 lineto -stroke -newpath -356 -232 moveto -351 -232 lineto -stroke -newpath -346 -232 moveto -341 -232 lineto -stroke -newpath -336 -232 moveto -331 -232 lineto -stroke -newpath -326 -232 moveto -321 -232 lineto -stroke -newpath -316 -232 moveto -311 -232 lineto -stroke -newpath -306 -232 moveto -301 -232 lineto -stroke -newpath -296 -232 moveto -291 -232 lineto -stroke -newpath -286 -232 moveto -281 -232 lineto -stroke -newpath -276 -232 moveto -271 -232 lineto -stroke -newpath -266 -232 moveto -261 -232 lineto -stroke -newpath -256 -232 moveto -251 -232 lineto -stroke -newpath -246 -232 moveto -241 -232 lineto -stroke -newpath -236 -232 moveto -231 -232 lineto -stroke -newpath -226 -232 moveto -221 -232 lineto -stroke -newpath -216 -232 moveto -211 -232 lineto -stroke -newpath -206 -232 moveto -201 -232 lineto -stroke -newpath -196 -232 moveto -191 -232 lineto -stroke -newpath -186 -232 moveto -181 -232 lineto -stroke -newpath -176 -232 moveto -171 -232 lineto -stroke -newpath -166 -232 moveto -161 -232 lineto -stroke -newpath -156 -232 moveto -151 -232 lineto -stroke -newpath -146 -232 moveto -141 -232 lineto -stroke -newpath -136 -232 moveto -131 -232 lineto -stroke -newpath -126 -232 moveto -121 -232 lineto -stroke -newpath -116 -232 moveto -111 -232 lineto -stroke -newpath -106 -232 moveto -101 -232 lineto -stroke -newpath -96 -232 moveto -91 -232 lineto -stroke -newpath -86 -232 moveto -81 -232 lineto -stroke -newpath -76 -232 moveto -71 -232 lineto -stroke -newpath -66 -232 moveto -64 -232 lineto -stroke -newpath -77 -225 moveto -65 -232 lineto -stroke -newpath -77 -239 moveto -65 -232 lineto -stroke -238 -248 moveto -( : verifier_responsible_for_name) show -newpath -64 -272 moveto -600 -272 lineto -stroke -newpath -599 -272 moveto -587 -279 lineto -587 -265 lineto -closepath -eofill -newpath -599 -272 moveto -587 -279 lineto -587 -265 lineto -closepath -stroke -173 -268 moveto -( : doPass2\(\)) show -newpath -621 -312 moveto -760 -312 lineto -764 -310 lineto -stroke -newpath -763 -311 moveto -752 -320 lineto -749 -306 lineto -closepath -eofill -newpath -763 -311 moveto -752 -320 lineto -749 -306 lineto -closepath -stroke -607 -308 moveto -( : create_if_not_cached) show -newpath -621 -352 moveto -808 -352 lineto -stroke -newpath -807 -352 moveto -795 -359 lineto -795 -345 lineto -closepath -eofill -newpath -807 -352 moveto -795 -359 lineto -795 -345 lineto -closepath -stroke -647 -348 moveto -( : verify\(\)) show -newpath -808 -432 moveto -621 -432 lineto -stroke -newpath -622 -432 moveto -634 -425 lineto -634 -439 lineto -closepath -eofill -newpath -622 -432 moveto -634 -425 lineto -634 -439 lineto -closepath -stroke -737 -448 moveto -( : doPass1\(\)) show -newpath -621 -472 moveto -933 -470 lineto -stroke -newpath -932 -471 moveto -920 -478 lineto -920 -464 lineto -closepath -eofill -newpath -932 -471 moveto -920 -478 lineto -920 -464 lineto -closepath -stroke -650 -468 moveto -( : create_if_not_cached) show -newpath -621 -512 moveto -977 -512 lineto -stroke -newpath -976 -512 moveto -964 -519 lineto -964 -505 lineto -closepath -eofill -newpath -976 -512 moveto -964 -519 lineto -964 -505 lineto -closepath -stroke -690 -508 moveto -( : verify\(\)) show -newpath -998 -552 moveto -1024 -552 lineto -1024 -568 lineto -1008 -568 lineto -998 -552 lineto -stroke -newpath -999 -553 moveto -1011 -559 lineto -999 -566 lineto -closepath -eofill -newpath -999 -553 moveto -1011 -559 lineto -999 -566 lineto -closepath -stroke -960 -548 moveto -( : do_some_verifying_work) show -newpath -977 -592 moveto -972 -592 lineto -stroke -newpath -967 -592 moveto -962 -592 lineto -stroke -newpath -957 -592 moveto -952 -592 lineto -stroke -newpath -947 -592 moveto -942 -592 lineto -stroke -newpath -937 -592 moveto -932 -592 lineto -stroke -newpath -927 -592 moveto -922 -592 lineto -stroke -newpath -917 -592 moveto -912 -592 lineto -stroke -newpath -907 -592 moveto -902 -592 lineto -stroke -newpath -897 -592 moveto -892 -592 lineto -stroke -newpath -887 -592 moveto -882 -592 lineto -stroke -newpath -877 -592 moveto -872 -592 lineto -stroke -newpath -867 -592 moveto -862 -592 lineto -stroke -newpath -857 -592 moveto -852 -592 lineto -stroke -newpath -847 -592 moveto -842 -592 lineto -stroke -newpath -837 -592 moveto -832 -592 lineto -stroke -newpath -827 -592 moveto -822 -592 lineto -stroke -newpath -817 -592 moveto -812 -592 lineto -stroke -newpath -807 -592 moveto -802 -592 lineto -stroke -newpath -797 -592 moveto -792 -592 lineto -stroke -newpath -787 -592 moveto -782 -592 lineto -stroke -newpath -777 -592 moveto -772 -592 lineto -stroke -newpath -767 -592 moveto -762 -592 lineto -stroke -newpath -757 -592 moveto -752 -592 lineto -stroke -newpath -747 -592 moveto -742 -592 lineto -stroke -newpath -737 -592 moveto -732 -592 lineto -stroke -newpath -727 -592 moveto -722 -592 lineto -stroke -newpath -717 -592 moveto -712 -592 lineto -stroke -newpath -707 -592 moveto -702 -592 lineto -stroke -newpath -697 -592 moveto -692 -592 lineto -stroke -newpath -687 -592 moveto -682 -592 lineto -stroke -newpath -677 -592 moveto -672 -592 lineto -stroke -newpath -667 -592 moveto -662 -592 lineto -stroke -newpath -657 -592 moveto -652 -592 lineto -stroke -newpath -647 -592 moveto -642 -592 lineto -stroke -newpath -637 -592 moveto -632 -592 lineto -stroke -newpath -627 -592 moveto -622 -592 lineto -stroke -newpath -634 -585 moveto -622 -592 lineto -stroke -newpath -634 -599 moveto -622 -592 lineto -stroke -873 -608 moveto -( : okay) show -newpath -621 -632 moveto -626 -632 lineto -stroke -newpath -631 -632 moveto -636 -632 lineto -stroke -newpath -641 -632 moveto -646 -632 lineto -stroke -newpath -651 -632 moveto -656 -632 lineto -stroke -newpath -661 -632 moveto -666 -632 lineto -stroke -newpath -671 -632 moveto -676 -632 lineto -stroke -newpath -681 -632 moveto -686 -632 lineto -stroke -newpath -691 -632 moveto -696 -632 lineto -stroke -newpath -701 -632 moveto -706 -632 lineto -stroke -newpath -711 -632 moveto -716 -632 lineto -stroke -newpath -721 -632 moveto -726 -632 lineto -stroke -newpath -731 -632 moveto -736 -632 lineto -stroke -newpath -741 -632 moveto -746 -632 lineto -stroke -newpath -751 -632 moveto -756 -632 lineto -stroke -newpath -761 -632 moveto -766 -632 lineto -stroke -newpath -771 -632 moveto -776 -632 lineto -stroke -newpath -781 -632 moveto -786 -632 lineto -stroke -newpath -791 -632 moveto -796 -632 lineto -stroke -newpath -801 -632 moveto -806 -632 lineto -stroke -newpath -795 -639 moveto -807 -632 lineto -stroke -newpath -795 -625 moveto -807 -632 lineto -stroke -652 -628 moveto -( : okay) show -newpath -829 -672 moveto -856 -672 lineto -856 -688 lineto -840 -688 lineto -829 -672 lineto -stroke -newpath -830 -673 moveto -842 -679 lineto -830 -686 lineto -closepath -eofill -newpath -830 -673 moveto -842 -679 lineto -830 -686 lineto -closepath -stroke -791 -668 moveto -( : do_some_verifying_work) show -newpath -808 -712 moveto -803 -712 lineto -stroke -newpath -798 -712 moveto -793 -712 lineto -stroke -newpath -788 -712 moveto -783 -712 lineto -stroke -newpath -778 -712 moveto -773 -712 lineto -stroke -newpath -768 -712 moveto -763 -712 lineto -stroke -newpath -758 -712 moveto -753 -712 lineto -stroke -newpath -748 -712 moveto -743 -712 lineto -stroke -newpath -738 -712 moveto -733 -712 lineto -stroke -newpath -728 -712 moveto -723 -712 lineto -stroke -newpath -718 -712 moveto -713 -712 lineto -stroke -newpath -708 -712 moveto -703 -712 lineto -stroke -newpath -698 -712 moveto -693 -712 lineto -stroke -newpath -688 -712 moveto -683 -712 lineto -stroke -newpath -678 -712 moveto -673 -712 lineto -stroke -newpath -668 -712 moveto -663 -712 lineto -stroke -newpath -658 -712 moveto -653 -712 lineto -stroke -newpath -648 -712 moveto -643 -712 lineto -stroke -newpath -638 -712 moveto -633 -712 lineto -stroke -newpath -628 -712 moveto -623 -712 lineto -stroke -newpath -634 -705 moveto -622 -712 lineto -stroke -newpath -634 -719 moveto -622 -712 lineto -stroke -747 -728 moveto -( : okay) show -newpath -600 -752 moveto -595 -752 lineto -stroke -newpath -590 -752 moveto -585 -752 lineto -stroke -newpath -580 -752 moveto -575 -752 lineto -stroke -newpath -570 -752 moveto -565 -752 lineto -stroke -newpath -560 -752 moveto -555 -752 lineto -stroke -newpath -550 -752 moveto -545 -752 lineto -stroke -newpath -540 -752 moveto -535 -752 lineto -stroke -newpath -530 -752 moveto -525 -752 lineto -stroke -newpath -520 -752 moveto -515 -752 lineto -stroke -newpath -510 -752 moveto -505 -752 lineto -stroke -newpath -500 -752 moveto -495 -752 lineto -stroke -newpath -490 -752 moveto -485 -752 lineto -stroke -newpath -480 -752 moveto -475 -752 lineto -stroke -newpath -470 -752 moveto -465 -752 lineto -stroke -newpath -460 -752 moveto -455 -752 lineto -stroke -newpath -450 -752 moveto -445 -752 lineto -stroke -newpath -440 -752 moveto -435 -752 lineto -stroke -newpath -430 -752 moveto -425 -752 lineto -stroke -newpath -420 -752 moveto -415 -752 lineto -stroke -newpath -410 -752 moveto -405 -752 lineto -stroke -newpath -400 -752 moveto -395 -752 lineto -stroke -newpath -390 -752 moveto -385 -752 lineto -stroke -newpath -380 -752 moveto -375 -752 lineto -stroke -newpath -370 -752 moveto -365 -752 lineto -stroke -newpath -360 -752 moveto -355 -752 lineto -stroke -newpath -350 -752 moveto -345 -752 lineto -stroke -newpath -340 -752 moveto -335 -752 lineto -stroke -newpath -330 -752 moveto -325 -752 lineto -stroke -newpath -320 -752 moveto -315 -752 lineto -stroke -newpath -310 -752 moveto -305 -752 lineto -stroke -newpath -300 -752 moveto -295 -752 lineto -stroke -newpath -290 -752 moveto -285 -752 lineto -stroke -newpath -280 -752 moveto -275 -752 lineto -stroke -newpath -270 -752 moveto -265 -752 lineto -stroke -newpath -260 -752 moveto -255 -752 lineto -stroke -newpath -250 -752 moveto -245 -752 lineto -stroke -newpath -240 -752 moveto -235 -752 lineto -stroke -newpath -230 -752 moveto -225 -752 lineto -stroke -newpath -220 -752 moveto -215 -752 lineto -stroke -newpath -210 -752 moveto -205 -752 lineto -stroke -newpath -200 -752 moveto -195 -752 lineto -stroke -newpath -190 -752 moveto -185 -752 lineto -stroke -newpath -180 -752 moveto -175 -752 lineto -stroke -newpath -170 -752 moveto -165 -752 lineto -stroke -newpath -160 -752 moveto -155 -752 lineto -stroke -newpath -150 -752 moveto -145 -752 lineto -stroke -newpath -140 -752 moveto -135 -752 lineto -stroke -newpath -130 -752 moveto -125 -752 lineto -stroke -newpath -120 -752 moveto -115 -752 lineto -stroke -newpath -110 -752 moveto -105 -752 lineto -stroke -newpath -100 -752 moveto -95 -752 lineto -stroke -newpath -90 -752 moveto -85 -752 lineto -stroke -newpath -80 -752 moveto -75 -752 lineto -stroke -newpath -70 -752 moveto -65 -752 lineto -stroke -newpath -77 -745 moveto -65 -752 lineto -stroke -newpath -77 -759 moveto -65 -752 lineto -stroke -414 -768 moveto -( : okayVerificationResult) show -newpath -829 -392 moveto -856 -392 lineto -856 -408 lineto -840 -408 lineto -829 -392 lineto -stroke -newpath -830 -393 moveto -842 -399 lineto -830 -406 lineto -closepath -eofill -newpath -830 -393 moveto -842 -399 lineto -830 -406 lineto -closepath -stroke -791 -388 moveto -( : do_some_verifying_work) show -1.0 1.0 1.0 setrgbcolor -newpath -892 -712 moveto -38 0 rlineto -0 -19 rlineto --38 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -892 -712 moveto -38 0 rlineto -0 -19 rlineto --38 0 rlineto -closepath -stroke -isolatin1encoding /_TimesRoman /TimesRoman RE -/_TimesRoman findfont -10 scalefont setfont -0.0 0.0 0.0 setrgbcolor -893 -728 moveto -(Pass One) show -0.0 0.0 0.0 setrgbcolor -newpath -904 -608 moveto -920 -712 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -660 -656 moveto -38 0 rlineto -0 -19 rlineto --38 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -660 -656 moveto -38 0 rlineto -0 -19 rlineto --38 0 rlineto -closepath -stroke -0.0 0.0 0.0 setrgbcolor -661 -672 moveto -(Pass One) show -0.0 0.0 0.0 setrgbcolor -newpath -688 -624 moveto -688 -664 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -677 -752 moveto -41 0 rlineto -0 -19 rlineto --41 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -677 -752 moveto -41 0 rlineto -0 -19 rlineto --41 0 rlineto -closepath -stroke -0.0 0.0 0.0 setrgbcolor -678 -768 moveto -(Pass Two) show -0.0 0.0 0.0 setrgbcolor -newpath -720 -760 moveto -760 -728 lineto -stroke -1.0 1.0 1.0 setrgbcolor -newpath -755 -224 moveto -115 0 rlineto -0 -34 rlineto --115 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -755 -224 moveto -115 0 rlineto -0 -34 rlineto --115 0 rlineto -closepath -stroke -0.0 0.0 0.0 setrgbcolor -762 -240 moveto -(Single Pass2Verifier with) show -756 -255 moveto -(respect to the class to verify.) show -0.0 0.0 0.0 setrgbcolor -newpath -816 -304 moveto -816 -256 lineto -stroke -1.0 1.0 1.0 setrgbcolor -%newpath -%960 -336 moveto -%-1 0 rlineto -%0 -39 rlineto -%1 0 rlineto -%closepath -%eofill -%0.0 0.0 0.0 setrgbcolor -%newpath -%960 -336 moveto -%-1 0 rlineto -%0 -39 rlineto -%1 0 rlineto -%closepath -%stroke -0.0 0.0 0.0 setrgbcolor -0.0 0.0 0.0 setrgbcolor -newpath -984 -424 moveto -984 -464 lineto -stroke -newpath -984 -424 moveto -984 -456 lineto -stroke -newpath -984 -432 moveto -984 -464 lineto -stroke -isolatin1encoding /_Helvetica /Helvetica RE -/_Helvetica findfont -9 scalefont setfont -73 -68 moveto -( : getName\(\)) show -156 -128 moveto -( : name) show -104 -148 moveto -( : getVerifier\(name\)) show -396 -188 moveto -( : create_if_not_cached) show -238 -248 moveto -( : verifier_responsible_for_name) show -173 -268 moveto -( : doPass2\(\)) show -607 -308 moveto -( : create_if_not_cached) show -647 -348 moveto -( : verify\(\)) show -737 -448 moveto -( : doPass1\(\)) show -650 -468 moveto -( : create_if_not_cached) show -690 -508 moveto -( : verify\(\)) show -960 -548 moveto -( : do_some_verifying_work) show -873 -608 moveto -( : okay) show -652 -628 moveto -( : okay) show -791 -668 moveto -( : do_some_verifying_work) show -747 -728 moveto -( : okay) show -414 -768 moveto -( : okayVerificationResult) show -791 -388 moveto -( : do_some_verifying_work) show -1.0 1.0 1.0 setrgbcolor -newpath -913 -392 moveto -115 0 rlineto -0 -34 rlineto --115 0 rlineto -closepath -eofill -0.0 0.0 0.0 setrgbcolor -newpath -913 -392 moveto -115 0 rlineto -0 -34 rlineto --115 0 rlineto -closepath -stroke -isolatin1encoding /_TimesRoman /TimesRoman RE -/_TimesRoman findfont -10 scalefont setfont -0.0 0.0 0.0 setrgbcolor -920 -408 moveto -(Single Pass1Verifier with) show -914 -423 moveto -(respect to the class to verify.) show -showpage -%%Trailer +%%EndSetup +1 setlinewidth +isolatin1encoding /_Helvetica /Helvetica RE +/_Helvetica findfont +12 scalefont setfont +0.0 0.0 0.0 setrgbcolor +0 807 translate +1.0 1.0 1.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +10 -10 moveto +86 0 rlineto +0 -26 rlineto +-86 0 rlineto +closepath +stroke +isolatin1encoding /_Helvetica /Helvetica RE +/_Helvetica findfont +9 scalefont setfont +newpath +21 -25 moveto +86 -25 lineto +stroke +21 -24 moveto +(firewall : Object) show +1.0 1.0 1.0 setrgbcolor +newpath +49 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +49 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +stroke +newpath +49 -796 moveto +58 -796 lineto +stroke +newpath +58 -796 moveto +49 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -72 moveto +20 0 rlineto +0 -679 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -72 moveto +20 0 rlineto +0 -679 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -72 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -72 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -112 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -112 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -152 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -152 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -232 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -232 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -272 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -272 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +43 -752 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +43 -752 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +157 -10 moveto +119 0 rlineto +0 -26 rlineto +-119 0 rlineto +closepath +stroke +newpath +168 -25 moveto +266 -25 lineto +stroke +168 -24 moveto +(aClassToVerify : Class) show +1.0 1.0 1.0 setrgbcolor +newpath +213 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +213 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +stroke +newpath +213 -796 moveto +222 -796 lineto +stroke +newpath +222 -796 moveto +213 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +207 -72 moveto +20 0 rlineto +0 -39 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +207 -72 moveto +20 0 rlineto +0 -39 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +207 -72 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +207 -72 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +207 -112 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +207 -112 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +337 -10 moveto +118 0 rlineto +0 -26 rlineto +-118 0 rlineto +closepath +stroke +newpath +348 -25 moveto +445 -25 lineto +stroke +348 -24 moveto +(theVF : VerifierFactory) show +1.0 1.0 1.0 setrgbcolor +newpath +392 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +392 -37 moveto +9 0 rlineto +0 -759 rlineto +-9 0 rlineto +closepath +stroke +newpath +392 -796 moveto +401 -796 lineto +stroke +newpath +401 -796 moveto +392 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +386 -152 moveto +20 0 rlineto +0 -79 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +386 -152 moveto +20 0 rlineto +0 -79 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +386 -152 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +386 -152 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +386 -192 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +386 -192 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +386 -232 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +386 -232 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +562 -180 moveto +95 0 rlineto +0 -26 rlineto +-95 0 rlineto +closepath +stroke +newpath +573 -195 moveto +647 -195 lineto +stroke +573 -194 moveto +(aVerifier : Verifier) show +1.0 1.0 1.0 setrgbcolor +newpath +606 -207 moveto +9 0 rlineto +0 -589 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +606 -207 moveto +9 0 rlineto +0 -589 rlineto +-9 0 rlineto +closepath +stroke +newpath +606 -796 moveto +615 -796 lineto +stroke +newpath +615 -796 moveto +606 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -207 moveto +20 0 rlineto +0 -544 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -207 moveto +20 0 rlineto +0 -544 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +562 -190 moveto +95 0 rlineto +0 1 rlineto +-95 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +562 -190 moveto +95 0 rlineto +0 1 rlineto +-95 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -272 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -272 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -312 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -312 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -352 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -352 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -432 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -432 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -472 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -472 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -512 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -512 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -592 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -592 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -632 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -632 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -712 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -712 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +600 -752 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +600 -752 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +764 -300 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +newpath +775 -315 moveto +862 -315 lineto +stroke +775 -314 moveto +(aP2V : Pass2Verifier) show +1.0 1.0 1.0 setrgbcolor +newpath +814 -327 moveto +9 0 rlineto +0 -469 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +814 -327 moveto +9 0 rlineto +0 -469 rlineto +-9 0 rlineto +closepath +stroke +newpath +814 -796 moveto +823 -796 lineto +stroke +newpath +823 -796 moveto +814 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -327 moveto +20 0 rlineto +0 -384 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -327 moveto +20 0 rlineto +0 -384 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +764 -310 moveto +108 0 rlineto +0 1 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +764 -310 moveto +108 0 rlineto +0 1 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -352 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -352 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -432 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -432 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -632 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -632 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -672 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -672 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -672 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -672 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -712 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -712 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -392 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -392 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +808 -392 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +808 -392 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +933 -460 moveto +108 0 rlineto +0 -26 rlineto +-108 0 rlineto +closepath +stroke +newpath +944 -475 moveto +1031 -475 lineto +stroke +944 -474 moveto +(aP1V : Pass1Verifier) show +1.0 1.0 1.0 setrgbcolor +newpath +983 -487 moveto +9 0 rlineto +0 -309 rlineto +-9 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +983 -487 moveto +9 0 rlineto +0 -309 rlineto +-9 0 rlineto +closepath +stroke +newpath +983 -796 moveto +992 -796 lineto +stroke +newpath +992 -796 moveto +983 -796 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +977 -487 moveto +20 0 rlineto +0 -104 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +977 -487 moveto +20 0 rlineto +0 -104 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +933 -470 moveto +108 0 rlineto +0 1 rlineto +-108 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +933 -470 moveto +108 0 rlineto +0 1 rlineto +-108 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +977 -512 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +977 -512 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +977 -552 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +977 -552 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +977 -552 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +977 -552 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +1.0 1.0 1.0 setrgbcolor +newpath +977 -592 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +977 -592 moveto +20 0 rlineto +0 1 rlineto +-20 0 rlineto +closepath +stroke +newpath +64 -72 moveto +207 -72 lineto +stroke +newpath +206 -72 moveto +194 -79 lineto +194 -65 lineto +closepath +eofill +newpath +206 -72 moveto +194 -79 lineto +194 -65 lineto +closepath +stroke +73 -68 moveto +( : getName\(\)) show +newpath +207 -112 moveto +202 -112 lineto +stroke +newpath +197 -112 moveto +192 -112 lineto +stroke +newpath +187 -112 moveto +182 -112 lineto +stroke +newpath +177 -112 moveto +172 -112 lineto +stroke +newpath +167 -112 moveto +162 -112 lineto +stroke +newpath +157 -112 moveto +152 -112 lineto +stroke +newpath +147 -112 moveto +142 -112 lineto +stroke +newpath +137 -112 moveto +132 -112 lineto +stroke +newpath +127 -112 moveto +122 -112 lineto +stroke +newpath +117 -112 moveto +112 -112 lineto +stroke +newpath +107 -112 moveto +102 -112 lineto +stroke +newpath +97 -112 moveto +92 -112 lineto +stroke +newpath +87 -112 moveto +82 -112 lineto +stroke +newpath +77 -112 moveto +72 -112 lineto +stroke +newpath +67 -112 moveto +64 -112 lineto +stroke +newpath +77 -105 moveto +65 -112 lineto +stroke +newpath +77 -119 moveto +65 -112 lineto +stroke +156 -128 moveto +( : name) show +newpath +64 -152 moveto +386 -152 lineto +stroke +newpath +385 -152 moveto +373 -159 lineto +373 -145 lineto +closepath +eofill +newpath +385 -152 moveto +373 -159 lineto +373 -145 lineto +closepath +stroke +104 -148 moveto +( : getVerifier\(name\)) show +newpath +407 -192 moveto +560 -192 lineto +562 -190 lineto +stroke +newpath +561 -191 moveto +550 -200 lineto +547 -186 lineto +closepath +eofill +newpath +561 -191 moveto +550 -200 lineto +547 -186 lineto +closepath +stroke +396 -188 moveto +( : create_if_not_cached) show +newpath +386 -232 moveto +381 -232 lineto +stroke +newpath +376 -232 moveto +371 -232 lineto +stroke +newpath +366 -232 moveto +361 -232 lineto +stroke +newpath +356 -232 moveto +351 -232 lineto +stroke +newpath +346 -232 moveto +341 -232 lineto +stroke +newpath +336 -232 moveto +331 -232 lineto +stroke +newpath +326 -232 moveto +321 -232 lineto +stroke +newpath +316 -232 moveto +311 -232 lineto +stroke +newpath +306 -232 moveto +301 -232 lineto +stroke +newpath +296 -232 moveto +291 -232 lineto +stroke +newpath +286 -232 moveto +281 -232 lineto +stroke +newpath +276 -232 moveto +271 -232 lineto +stroke +newpath +266 -232 moveto +261 -232 lineto +stroke +newpath +256 -232 moveto +251 -232 lineto +stroke +newpath +246 -232 moveto +241 -232 lineto +stroke +newpath +236 -232 moveto +231 -232 lineto +stroke +newpath +226 -232 moveto +221 -232 lineto +stroke +newpath +216 -232 moveto +211 -232 lineto +stroke +newpath +206 -232 moveto +201 -232 lineto +stroke +newpath +196 -232 moveto +191 -232 lineto +stroke +newpath +186 -232 moveto +181 -232 lineto +stroke +newpath +176 -232 moveto +171 -232 lineto +stroke +newpath +166 -232 moveto +161 -232 lineto +stroke +newpath +156 -232 moveto +151 -232 lineto +stroke +newpath +146 -232 moveto +141 -232 lineto +stroke +newpath +136 -232 moveto +131 -232 lineto +stroke +newpath +126 -232 moveto +121 -232 lineto +stroke +newpath +116 -232 moveto +111 -232 lineto +stroke +newpath +106 -232 moveto +101 -232 lineto +stroke +newpath +96 -232 moveto +91 -232 lineto +stroke +newpath +86 -232 moveto +81 -232 lineto +stroke +newpath +76 -232 moveto +71 -232 lineto +stroke +newpath +66 -232 moveto +64 -232 lineto +stroke +newpath +77 -225 moveto +65 -232 lineto +stroke +newpath +77 -239 moveto +65 -232 lineto +stroke +238 -248 moveto +( : verifier_responsible_for_name) show +newpath +64 -272 moveto +600 -272 lineto +stroke +newpath +599 -272 moveto +587 -279 lineto +587 -265 lineto +closepath +eofill +newpath +599 -272 moveto +587 -279 lineto +587 -265 lineto +closepath +stroke +173 -268 moveto +( : doPass2\(\)) show +newpath +621 -312 moveto +760 -312 lineto +764 -310 lineto +stroke +newpath +763 -311 moveto +752 -320 lineto +749 -306 lineto +closepath +eofill +newpath +763 -311 moveto +752 -320 lineto +749 -306 lineto +closepath +stroke +607 -308 moveto +( : create_if_not_cached) show +newpath +621 -352 moveto +808 -352 lineto +stroke +newpath +807 -352 moveto +795 -359 lineto +795 -345 lineto +closepath +eofill +newpath +807 -352 moveto +795 -359 lineto +795 -345 lineto +closepath +stroke +647 -348 moveto +( : verify\(\)) show +newpath +808 -432 moveto +621 -432 lineto +stroke +newpath +622 -432 moveto +634 -425 lineto +634 -439 lineto +closepath +eofill +newpath +622 -432 moveto +634 -425 lineto +634 -439 lineto +closepath +stroke +737 -448 moveto +( : doPass1\(\)) show +newpath +621 -472 moveto +933 -470 lineto +stroke +newpath +932 -471 moveto +920 -478 lineto +920 -464 lineto +closepath +eofill +newpath +932 -471 moveto +920 -478 lineto +920 -464 lineto +closepath +stroke +650 -468 moveto +( : create_if_not_cached) show +newpath +621 -512 moveto +977 -512 lineto +stroke +newpath +976 -512 moveto +964 -519 lineto +964 -505 lineto +closepath +eofill +newpath +976 -512 moveto +964 -519 lineto +964 -505 lineto +closepath +stroke +690 -508 moveto +( : verify\(\)) show +newpath +998 -552 moveto +1024 -552 lineto +1024 -568 lineto +1008 -568 lineto +998 -552 lineto +stroke +newpath +999 -553 moveto +1011 -559 lineto +999 -566 lineto +closepath +eofill +newpath +999 -553 moveto +1011 -559 lineto +999 -566 lineto +closepath +stroke +960 -548 moveto +( : do_some_verifying_work) show +newpath +977 -592 moveto +972 -592 lineto +stroke +newpath +967 -592 moveto +962 -592 lineto +stroke +newpath +957 -592 moveto +952 -592 lineto +stroke +newpath +947 -592 moveto +942 -592 lineto +stroke +newpath +937 -592 moveto +932 -592 lineto +stroke +newpath +927 -592 moveto +922 -592 lineto +stroke +newpath +917 -592 moveto +912 -592 lineto +stroke +newpath +907 -592 moveto +902 -592 lineto +stroke +newpath +897 -592 moveto +892 -592 lineto +stroke +newpath +887 -592 moveto +882 -592 lineto +stroke +newpath +877 -592 moveto +872 -592 lineto +stroke +newpath +867 -592 moveto +862 -592 lineto +stroke +newpath +857 -592 moveto +852 -592 lineto +stroke +newpath +847 -592 moveto +842 -592 lineto +stroke +newpath +837 -592 moveto +832 -592 lineto +stroke +newpath +827 -592 moveto +822 -592 lineto +stroke +newpath +817 -592 moveto +812 -592 lineto +stroke +newpath +807 -592 moveto +802 -592 lineto +stroke +newpath +797 -592 moveto +792 -592 lineto +stroke +newpath +787 -592 moveto +782 -592 lineto +stroke +newpath +777 -592 moveto +772 -592 lineto +stroke +newpath +767 -592 moveto +762 -592 lineto +stroke +newpath +757 -592 moveto +752 -592 lineto +stroke +newpath +747 -592 moveto +742 -592 lineto +stroke +newpath +737 -592 moveto +732 -592 lineto +stroke +newpath +727 -592 moveto +722 -592 lineto +stroke +newpath +717 -592 moveto +712 -592 lineto +stroke +newpath +707 -592 moveto +702 -592 lineto +stroke +newpath +697 -592 moveto +692 -592 lineto +stroke +newpath +687 -592 moveto +682 -592 lineto +stroke +newpath +677 -592 moveto +672 -592 lineto +stroke +newpath +667 -592 moveto +662 -592 lineto +stroke +newpath +657 -592 moveto +652 -592 lineto +stroke +newpath +647 -592 moveto +642 -592 lineto +stroke +newpath +637 -592 moveto +632 -592 lineto +stroke +newpath +627 -592 moveto +622 -592 lineto +stroke +newpath +634 -585 moveto +622 -592 lineto +stroke +newpath +634 -599 moveto +622 -592 lineto +stroke +873 -608 moveto +( : okay) show +newpath +621 -632 moveto +626 -632 lineto +stroke +newpath +631 -632 moveto +636 -632 lineto +stroke +newpath +641 -632 moveto +646 -632 lineto +stroke +newpath +651 -632 moveto +656 -632 lineto +stroke +newpath +661 -632 moveto +666 -632 lineto +stroke +newpath +671 -632 moveto +676 -632 lineto +stroke +newpath +681 -632 moveto +686 -632 lineto +stroke +newpath +691 -632 moveto +696 -632 lineto +stroke +newpath +701 -632 moveto +706 -632 lineto +stroke +newpath +711 -632 moveto +716 -632 lineto +stroke +newpath +721 -632 moveto +726 -632 lineto +stroke +newpath +731 -632 moveto +736 -632 lineto +stroke +newpath +741 -632 moveto +746 -632 lineto +stroke +newpath +751 -632 moveto +756 -632 lineto +stroke +newpath +761 -632 moveto +766 -632 lineto +stroke +newpath +771 -632 moveto +776 -632 lineto +stroke +newpath +781 -632 moveto +786 -632 lineto +stroke +newpath +791 -632 moveto +796 -632 lineto +stroke +newpath +801 -632 moveto +806 -632 lineto +stroke +newpath +795 -639 moveto +807 -632 lineto +stroke +newpath +795 -625 moveto +807 -632 lineto +stroke +652 -628 moveto +( : okay) show +newpath +829 -672 moveto +856 -672 lineto +856 -688 lineto +840 -688 lineto +829 -672 lineto +stroke +newpath +830 -673 moveto +842 -679 lineto +830 -686 lineto +closepath +eofill +newpath +830 -673 moveto +842 -679 lineto +830 -686 lineto +closepath +stroke +791 -668 moveto +( : do_some_verifying_work) show +newpath +808 -712 moveto +803 -712 lineto +stroke +newpath +798 -712 moveto +793 -712 lineto +stroke +newpath +788 -712 moveto +783 -712 lineto +stroke +newpath +778 -712 moveto +773 -712 lineto +stroke +newpath +768 -712 moveto +763 -712 lineto +stroke +newpath +758 -712 moveto +753 -712 lineto +stroke +newpath +748 -712 moveto +743 -712 lineto +stroke +newpath +738 -712 moveto +733 -712 lineto +stroke +newpath +728 -712 moveto +723 -712 lineto +stroke +newpath +718 -712 moveto +713 -712 lineto +stroke +newpath +708 -712 moveto +703 -712 lineto +stroke +newpath +698 -712 moveto +693 -712 lineto +stroke +newpath +688 -712 moveto +683 -712 lineto +stroke +newpath +678 -712 moveto +673 -712 lineto +stroke +newpath +668 -712 moveto +663 -712 lineto +stroke +newpath +658 -712 moveto +653 -712 lineto +stroke +newpath +648 -712 moveto +643 -712 lineto +stroke +newpath +638 -712 moveto +633 -712 lineto +stroke +newpath +628 -712 moveto +623 -712 lineto +stroke +newpath +634 -705 moveto +622 -712 lineto +stroke +newpath +634 -719 moveto +622 -712 lineto +stroke +747 -728 moveto +( : okay) show +newpath +600 -752 moveto +595 -752 lineto +stroke +newpath +590 -752 moveto +585 -752 lineto +stroke +newpath +580 -752 moveto +575 -752 lineto +stroke +newpath +570 -752 moveto +565 -752 lineto +stroke +newpath +560 -752 moveto +555 -752 lineto +stroke +newpath +550 -752 moveto +545 -752 lineto +stroke +newpath +540 -752 moveto +535 -752 lineto +stroke +newpath +530 -752 moveto +525 -752 lineto +stroke +newpath +520 -752 moveto +515 -752 lineto +stroke +newpath +510 -752 moveto +505 -752 lineto +stroke +newpath +500 -752 moveto +495 -752 lineto +stroke +newpath +490 -752 moveto +485 -752 lineto +stroke +newpath +480 -752 moveto +475 -752 lineto +stroke +newpath +470 -752 moveto +465 -752 lineto +stroke +newpath +460 -752 moveto +455 -752 lineto +stroke +newpath +450 -752 moveto +445 -752 lineto +stroke +newpath +440 -752 moveto +435 -752 lineto +stroke +newpath +430 -752 moveto +425 -752 lineto +stroke +newpath +420 -752 moveto +415 -752 lineto +stroke +newpath +410 -752 moveto +405 -752 lineto +stroke +newpath +400 -752 moveto +395 -752 lineto +stroke +newpath +390 -752 moveto +385 -752 lineto +stroke +newpath +380 -752 moveto +375 -752 lineto +stroke +newpath +370 -752 moveto +365 -752 lineto +stroke +newpath +360 -752 moveto +355 -752 lineto +stroke +newpath +350 -752 moveto +345 -752 lineto +stroke +newpath +340 -752 moveto +335 -752 lineto +stroke +newpath +330 -752 moveto +325 -752 lineto +stroke +newpath +320 -752 moveto +315 -752 lineto +stroke +newpath +310 -752 moveto +305 -752 lineto +stroke +newpath +300 -752 moveto +295 -752 lineto +stroke +newpath +290 -752 moveto +285 -752 lineto +stroke +newpath +280 -752 moveto +275 -752 lineto +stroke +newpath +270 -752 moveto +265 -752 lineto +stroke +newpath +260 -752 moveto +255 -752 lineto +stroke +newpath +250 -752 moveto +245 -752 lineto +stroke +newpath +240 -752 moveto +235 -752 lineto +stroke +newpath +230 -752 moveto +225 -752 lineto +stroke +newpath +220 -752 moveto +215 -752 lineto +stroke +newpath +210 -752 moveto +205 -752 lineto +stroke +newpath +200 -752 moveto +195 -752 lineto +stroke +newpath +190 -752 moveto +185 -752 lineto +stroke +newpath +180 -752 moveto +175 -752 lineto +stroke +newpath +170 -752 moveto +165 -752 lineto +stroke +newpath +160 -752 moveto +155 -752 lineto +stroke +newpath +150 -752 moveto +145 -752 lineto +stroke +newpath +140 -752 moveto +135 -752 lineto +stroke +newpath +130 -752 moveto +125 -752 lineto +stroke +newpath +120 -752 moveto +115 -752 lineto +stroke +newpath +110 -752 moveto +105 -752 lineto +stroke +newpath +100 -752 moveto +95 -752 lineto +stroke +newpath +90 -752 moveto +85 -752 lineto +stroke +newpath +80 -752 moveto +75 -752 lineto +stroke +newpath +70 -752 moveto +65 -752 lineto +stroke +newpath +77 -745 moveto +65 -752 lineto +stroke +newpath +77 -759 moveto +65 -752 lineto +stroke +414 -768 moveto +( : okayVerificationResult) show +newpath +829 -392 moveto +856 -392 lineto +856 -408 lineto +840 -408 lineto +829 -392 lineto +stroke +newpath +830 -393 moveto +842 -399 lineto +830 -406 lineto +closepath +eofill +newpath +830 -393 moveto +842 -399 lineto +830 -406 lineto +closepath +stroke +791 -388 moveto +( : do_some_verifying_work) show +1.0 1.0 1.0 setrgbcolor +newpath +892 -712 moveto +38 0 rlineto +0 -19 rlineto +-38 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +892 -712 moveto +38 0 rlineto +0 -19 rlineto +-38 0 rlineto +closepath +stroke +isolatin1encoding /_TimesRoman /TimesRoman RE +/_TimesRoman findfont +10 scalefont setfont +0.0 0.0 0.0 setrgbcolor +893 -728 moveto +(Pass One) show +0.0 0.0 0.0 setrgbcolor +newpath +904 -608 moveto +920 -712 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +660 -656 moveto +38 0 rlineto +0 -19 rlineto +-38 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +660 -656 moveto +38 0 rlineto +0 -19 rlineto +-38 0 rlineto +closepath +stroke +0.0 0.0 0.0 setrgbcolor +661 -672 moveto +(Pass One) show +0.0 0.0 0.0 setrgbcolor +newpath +688 -624 moveto +688 -664 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +677 -752 moveto +41 0 rlineto +0 -19 rlineto +-41 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +677 -752 moveto +41 0 rlineto +0 -19 rlineto +-41 0 rlineto +closepath +stroke +0.0 0.0 0.0 setrgbcolor +678 -768 moveto +(Pass Two) show +0.0 0.0 0.0 setrgbcolor +newpath +720 -760 moveto +760 -728 lineto +stroke +1.0 1.0 1.0 setrgbcolor +newpath +755 -224 moveto +115 0 rlineto +0 -34 rlineto +-115 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +755 -224 moveto +115 0 rlineto +0 -34 rlineto +-115 0 rlineto +closepath +stroke +0.0 0.0 0.0 setrgbcolor +762 -240 moveto +(Single Pass2Verifier with) show +756 -255 moveto +(respect to the class to verify.) show +0.0 0.0 0.0 setrgbcolor +newpath +816 -304 moveto +816 -256 lineto +stroke +1.0 1.0 1.0 setrgbcolor +%newpath +%960 -336 moveto +%-1 0 rlineto +%0 -39 rlineto +%1 0 rlineto +%closepath +%eofill +%0.0 0.0 0.0 setrgbcolor +%newpath +%960 -336 moveto +%-1 0 rlineto +%0 -39 rlineto +%1 0 rlineto +%closepath +%stroke +0.0 0.0 0.0 setrgbcolor +0.0 0.0 0.0 setrgbcolor +newpath +984 -424 moveto +984 -464 lineto +stroke +newpath +984 -424 moveto +984 -456 lineto +stroke +newpath +984 -432 moveto +984 -464 lineto +stroke +isolatin1encoding /_Helvetica /Helvetica RE +/_Helvetica findfont +9 scalefont setfont +73 -68 moveto +( : getName\(\)) show +156 -128 moveto +( : name) show +104 -148 moveto +( : getVerifier\(name\)) show +396 -188 moveto +( : create_if_not_cached) show +238 -248 moveto +( : verifier_responsible_for_name) show +173 -268 moveto +( : doPass2\(\)) show +607 -308 moveto +( : create_if_not_cached) show +647 -348 moveto +( : verify\(\)) show +737 -448 moveto +( : doPass1\(\)) show +650 -468 moveto +( : create_if_not_cached) show +690 -508 moveto +( : verify\(\)) show +960 -548 moveto +( : do_some_verifying_work) show +873 -608 moveto +( : okay) show +652 -628 moveto +( : okay) show +791 -668 moveto +( : do_some_verifying_work) show +747 -728 moveto +( : okay) show +414 -768 moveto +( : okayVerificationResult) show +791 -388 moveto +( : do_some_verifying_work) show +1.0 1.0 1.0 setrgbcolor +newpath +913 -392 moveto +115 0 rlineto +0 -34 rlineto +-115 0 rlineto +closepath +eofill +0.0 0.0 0.0 setrgbcolor +newpath +913 -392 moveto +115 0 rlineto +0 -34 rlineto +-115 0 rlineto +closepath +stroke +isolatin1encoding /_TimesRoman /TimesRoman RE +/_TimesRoman findfont +10 scalefont setfont +0.0 0.0 0.0 setrgbcolor +920 -408 moveto +(Single Pass1Verifier with) show +914 -423 moveto +(respect to the class to verify.) show +showpage +%%Trailer diff --git a/pom.xml b/pom.xml index da01b73966..fceb72b52a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,606 +1,632 @@ - - - - - 4.0.0 - - - org.apache.commons - commons-parent - 65 - - - org.apache.bcel - bcel - jar - 6.8.1 - Apache Commons BCEL - Apache Commons Bytecode Engineering Library - - https://commons.apache.org/proper/commons-bcel - 2004 - - - UTF-8 - UTF-8 - 1.8 - 1.8 - bcel - org.apache.bcel - 6.8.1 - 6.8.2 - true - RC1 - 6.8.0 - (Java 8 or above) - https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-bcel - scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid} - - org.apache.${commons.componentid} - org.apache.bcel.*;version=${project.version};-noimport:=true - * - - - BCEL - 12314220 - 4.11.0 - 3.25.1 - 5.14.0 - false - - - - - apache.website - Apache Commons Site - scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-bcel/ - - - - - GitHub - https://github.com/apache/commons-bcel/actions - - - - jira - https://issues.apache.org/jira/browse/BCEL - - - - scm:git:https://gitbox.apache.org/repos/asf/commons-bcel.git - scm:git:https://gitbox.apache.org/repos/asf/commons-bcel.git - https://gitbox.apache.org/repos/asf?p=commons-bcel.git - - - - clean verify apache-rat:check japicmp:cmp checkstyle:check pmd:check spotbugs:check javadoc:javadoc - - - org.apache.felix - maven-bundle-plugin - - - org.apache.rat - apache-rat-plugin - - - src/test/resources/** - docs/*.bib - docs/*.mdl - docs/eps/* - **/*.eps - **/*.bnf - **/*.mini - TODO.JustIce - README-codespecs.txt - src/examples/Mini/MiniParser$JJCalls - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - - - org.apache.bcel - - - - - - maven-compiler-plugin - - - **/*Benchmark* - - - true - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - maven-surefire-plugin - - - - false - - - **/*TestCase.java - **/PerformanceTest.java - - - **/Abstract* - - **/JDKClassDumpTestCase.java - - alphabetical - - - - maven-assembly-plugin - - - - src/assembly/bin.xml - src/assembly/src.xml - - gnu - - - - org.apache.maven.plugins - maven-scm-publish-plugin - - - javadocs - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - ${basedir}/src/conf/checkstyle.xml - - config_loc=${basedir} - false - - - - com.github.siom79.japicmp - japicmp-maven-plugin - - - com.github.spotbugs - spotbugs-maven-plugin - - Normal - Default - src/conf/spotbugs-exclude-filter.xml - - - - org.apache.maven.plugins - maven-pmd-plugin - - ${maven.compiler.target} - - ${basedir}/src/conf/pmd-ruleset.xml - - - - - org.jacoco - jacoco-maven-plugin - - - merge-all-jacoco - - merge - - install - - - - ${project.build.directory} - - *.exec - - - - - - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - ${basedir}/src/conf/checkstyle.xml - - config_loc=${basedir} - false - - - - - - checkstyle - - - - - - org.apache.maven.plugins - maven-pmd-plugin - - ${maven.compiler.target} - true - - - - org.codehaus.mojo - taglist-maven-plugin - 3.0.0 - - - TODO - NOPMD - NOTE - - - - - org.apache.rat - apache-rat-plugin - ${commons.rat.version} - - - src/test/resources/** - docs/*.bib - docs/*.mdl - docs/eps/* - **/*.eps - **/*.bnf - **/*.mini - TODO.JustIce - src/examples/Mini/MiniParser$JJCalls - - - - - com.github.siom79.japicmp - japicmp-maven-plugin - - - com.github.spotbugs - spotbugs-maven-plugin - - Normal - Default - src/conf/spotbugs-exclude-filter.xml - - 9 - - - - - - - - org.junit.jupiter - junit-jupiter - test - - - org.mockito - mockito-core - ${mockito.version} - test - - - org.assertj - assertj-core - ${assertj.version} - test - - - net.java.dev.jna - jna - ${jna.version} - test - - - net.java.dev.jna - jna-platform - ${jna.version} - test - - - org.apache.commons - commons-lang3 - 3.14.0 - - - commons-io - commons-io - 2.15.1 - test - - - - javax - javaee-api - 6.0 - test - - - org.apache.commons - commons-exec - 1.4.0 - test - - - - commons-lang - commons-lang - 2.0 - test - - - wsdl4j - wsdl4j - 1.5.3 - test - - - - - org.eclipse.jdt - ecj - 3.26.0 - test - - - org.jetbrains.kotlin - kotlin-stdlib - 1.9.22 - test - - - - - - - jdk-rt - - - - maven-surefire-plugin - ${commons.surefire.version} - - - **/PerformanceTest.java - - - - - - - - - - benchmark - - - true - org.apache - 1.37 - - - - - org.openjdk.jmh - jmh-core - ${jmh.version} - test - - - - org.openjdk.jmh - jmh-generator-annprocess - ${jmh.version} - test - - - - commons-io - commons-io - 2.15.1 - test - - - - org.apache.commons - commons-collections4 - 4.4 - test - - - - - - - - maven-compiler-plugin - ${commons.compiler.version} - - - **/* - - - - - - - org.codehaus.mojo - exec-maven-plugin - - - benchmark - test - - exec - - - test - java - - -classpath - - org.openjdk.jmh.Main - -rf - json - -rff - target/jmh-result.json - ${benchmark} - - - - - - - - - - - - - - Dave Brosius - dbrosius - dbrosius at mebigfatguy.com - - - Torsten Curdt - tcurdt - tcurdt at apache.org - ASF - http://www.apache.org/ - +1 - - - Markus Dahm - mdahm - m.dahm at gmx.de - it-frameworksolutions - - - Jason van Zyl - jason at zenplex.com - - - ggregory - Gary Gregory - ggregory at apache.org - https://www.garygregory.com - The Apache Software Foundation - https://www.apache.org/ - - PMC Member - - America/New_York - - https://people.apache.org/~ggregory/img/garydgregory80.png - - - - - - Enver Haase - enver at convergence.de - - - David Dixon-Peugh - dixonpeugh at yahoo.com - - - Patrick Beard - beard at netscape.com - - - Conor MacNeill - conor at cortexbusiness.com.au - - - Costin Manolache - cmanolache at yahoo.com - - - Bill Pugh - bill.pugh at gmail.com - - - First Hop Ltd / Torsten Rueger - - - Jérôme Leroux - - - Mark Roberts - - - Sam Yoon - - - Arturo Bernal - - - + + + + + 4.0.0 + + + org.apache.commons + commons-parent + 69 + + + org.apache.bcel + bcel + jar + 6.9.0 + Apache Commons BCEL + Apache Commons Bytecode Engineering Library + + https://commons.apache.org/proper/commons-bcel + 2004 + + + UTF-8 + UTF-8 + 2024-04-21T16:51:47Z + 1.8 + 1.8 + bcel + org.apache.bcel + 6.9.0 + 6.9.1 + true + RC1 + 6.8.2 + (Java 8 or above) + https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-bcel + scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid} + + org.apache.${commons.componentid} + org.apache.bcel.*;version=${project.version};-noimport:=true + * + + + BCEL + 12314220 + 4.11.0 + 3.25.3 + 5.14.0 + false + true + + + + 0.89 + 0.65 + 0.70 + 0.59 + 0.68 + 0.58 + + + + + apache.website + Apache Commons Site + scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-bcel/ + + + + + GitHub + https://github.com/apache/commons-bcel/actions + + + + jira + https://issues.apache.org/jira/browse/BCEL + + + + scm:git:https://gitbox.apache.org/repos/asf/commons-bcel.git + scm:git:https://gitbox.apache.org/repos/asf/commons-bcel.git + https://gitbox.apache.org/repos/asf?p=commons-bcel.git + + + + clean verify apache-rat:check japicmp:cmp checkstyle:check pmd:check spotbugs:check javadoc:javadoc + + + org.apache.felix + maven-bundle-plugin + + + org.apache.rat + apache-rat-plugin + + + src/test/resources/** + docs/*.bib + docs/*.mdl + docs/eps/* + **/*.eps + **/*.bnf + **/*.mini + TODO.JustIce + README-codespecs.txt + src/examples/Mini/MiniParser$JJCalls + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + test-jar + + + + + + + + org.apache.bcel + + + + + + maven-compiler-plugin + + + **/*Benchmark* + + + true + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + maven-surefire-plugin + + + + false + + + **/*TestCase.java + **/PerformanceTest.java + + + **/Abstract* + + **/JDKClassDumpTestCase.java + + alphabetical + + + + maven-assembly-plugin + + + + src/assembly/bin.xml + src/assembly/src.xml + + gnu + + + + org.apache.maven.plugins + maven-scm-publish-plugin + + + javadocs + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${basedir}/src/conf/checkstyle.xml + + config_loc=${basedir} + false + true + + + + com.github.siom79.japicmp + japicmp-maven-plugin + + + com.github.spotbugs + spotbugs-maven-plugin + + Normal + Default + src/conf/spotbugs-exclude-filter.xml + + + + org.apache.maven.plugins + maven-pmd-plugin + + ${maven.compiler.target} + + ${basedir}/src/conf/pmd-ruleset.xml + + + + + org.jacoco + jacoco-maven-plugin + + + merge-all-jacoco + + merge + + install + + + + ${project.build.directory} + + *.exec + + + + + + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${basedir}/src/conf/checkstyle.xml + + config_loc=${basedir} + false + + + + + + checkstyle + + + + + + org.apache.maven.plugins + maven-pmd-plugin + + ${maven.compiler.target} + true + + + + org.codehaus.mojo + taglist-maven-plugin + 3.0.0 + + + TODO + NOPMD + NOTE + + + + + org.apache.rat + apache-rat-plugin + ${commons.rat.version} + + + src/test/resources/** + docs/*.bib + docs/*.mdl + docs/eps/* + **/*.eps + **/*.bnf + **/*.mini + TODO.JustIce + src/examples/Mini/MiniParser$JJCalls + + + + + com.github.siom79.japicmp + japicmp-maven-plugin + + + com.github.spotbugs + spotbugs-maven-plugin + + Normal + Default + src/conf/spotbugs-exclude-filter.xml + + 9 + + + + + + + + org.junit.jupiter + junit-jupiter + test + + + org.mockito + mockito-core + ${mockito.version} + test + + + org.assertj + assertj-core + ${assertj.version} + test + + + net.java.dev.jna + jna + ${jna.version} + test + + + net.java.dev.jna + jna-platform + ${jna.version} + test + + + org.apache.commons + commons-lang3 + 3.14.0 + + + commons-io + commons-io + 2.16.1 + test + + + + javax + javaee-api + 6.0 + test + + + org.apache.commons + commons-exec + 1.4.0 + test + + + + commons-lang + commons-lang + 2.0 + test + + + wsdl4j + wsdl4j + 1.5.3 + test + + + + + org.eclipse.jdt + ecj + 3.26.0 + test + + + org.jetbrains.kotlin + kotlin-stdlib + 1.9.23 + test + + + + + + + jdk-rt + + + + maven-surefire-plugin + ${commons.surefire.version} + + + **/PerformanceTest.java + + + + + + + + + + benchmark + + + true + org.apache + 1.37 + + + + + org.openjdk.jmh + jmh-core + ${jmh.version} + test + + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + test + + + + commons-io + commons-io + 2.16.1 + test + + + + org.apache.commons + commons-collections4 + 4.4 + test + + + + + + + + maven-compiler-plugin + ${commons.compiler.version} + + + **/* + + + + + + org.codehaus.mojo + exec-maven-plugin + + + benchmark + test + + exec + + + test + java + + -classpath + + org.openjdk.jmh.Main + -rf + json + -rff + target/jmh-result.json + ${benchmark} + + + + + + + + + + + java-9-up + + [9,) + + + + 0.90 + 0.65 + 0.70 + 0.58 + 0.68 + 0.58 + + + + + + + Dave Brosius + dbrosius + dbrosius at mebigfatguy.com + + + Torsten Curdt + tcurdt + tcurdt at apache.org + ASF + http://www.apache.org/ + +1 + + + Markus Dahm + mdahm + m.dahm at gmx.de + it-frameworksolutions + + + Jason van Zyl + jason at zenplex.com + + + ggregory + Gary Gregory + ggregory at apache.org + https://www.garygregory.com + The Apache Software Foundation + https://www.apache.org/ + + PMC Member + + America/New_York + + https://people.apache.org/~ggregory/img/garydgregory80.png + + + + + + Enver Haase + enver at convergence.de + + + David Dixon-Peugh + dixonpeugh at yahoo.com + + + Patrick Beard + beard at netscape.com + + + Conor MacNeill + conor at cortexbusiness.com.au + + + Costin Manolache + cmanolache at yahoo.com + + + Bill Pugh + bill.pugh at gmail.com + + + First Hop Ltd / Torsten Rueger + + + Jérôme Leroux + + + Mark Roberts + + + Sam Yoon + + + Arturo Bernal + + + diff --git a/src/assembly/bin.xml b/src/assembly/bin.xml index c7ea526821..7c2b327929 100644 --- a/src/assembly/bin.xml +++ b/src/assembly/bin.xml @@ -14,7 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. --> - + bin tar.gz diff --git a/src/assembly/src.xml b/src/assembly/src.xml index ef4025a216..f6205a10ee 100644 --- a/src/assembly/src.xml +++ b/src/assembly/src.xml @@ -14,7 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. --> - + src tar.gz diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 73c30411ee..acc9b8b6ca 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -1,6 +1,5 @@ - @@ -46,7 +43,6 @@ The type attribute can be add,update,fix,remove. Apache Commons BCEL Release Notes Apache Commons developers - - + + + Add Support for Java 16 records #290. + + Add null guard for InstructionFactory.createInvoke() #289. + Avoid possible NullPointerException in org.apache.bcel.classfile.DescendingVisitor.accept(E[]). + Avoid possible NullPointerException in AnnotationEntryGen.getAnnotationAttributes(ConstantPoolGen, AnnotationEntryGen[]). + Avoid possible NullPointerException in AnnotationEntryGen.copyValues(ElementValuePair[], ConstantPoolGen, boolean). + Avoid possible NullPointerException in ArrayElementValueGen.ArrayElementValueGen(int, ElementValue[], ConstantPoolGen). + Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.setMethods(Method[]). + Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.unpackAnnotations(Attribute[]). + Avoid possible NullPointerException in org.apache.bcel.classfile.ParameterAnnotationEntry.createParameterAnnotationEntries(Attribute[]). + Avoid possible NullPointerException in org.apache.bcel.generic.ClassGen.ClassGen(JavaClass). + Avoid possible NullPointerException in org.apache.bcel.generic.FieldGenOrMethodGen.addAll(Attribute[]). + Avoid possible NullPointerException in org.apache.bcel.classfile.ParameterAnnotationEntry.createParameterAnnotationEntries(Attribute[]). + Avoid NullPointerException after calling org.apache.bcel.classfile.MethodParameters.setParameters(MethodParameter[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.ParameterAnnotations.setParameterAnnotationTable(ParameterAnnotationEntry[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.LocalVariableTypeTable.setLocalVariableTable(LocalVariable[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.LocalVariableTable.setLocalVariableTable(LocalVariable[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.LineNumberTable.setLineNumberTable(LineNumber[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setMethods(Method[] with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setInterfaces(int[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setInterfaceNames(String[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setFields(Field[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.JavaClass.setAttributes(Attribute[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.ConstantPool.setConstantPool(Constant[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.FieldOrMethod.setAttributes(Attribute[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.Annotations.setAnnotationTable(AnnotationEntry[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.ArrayElementValue.ArrayElementValue(int, ElementValue[], ConstantPool) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethod.BootstrapMethod(int, int[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethod.setBootstrapArguments(int[]) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethods.BootstrapMethods(int, int, BootstrapMethod[], ConstantPool) with null. + Avoid NullPointerException after calling org.apache.bcel.classfile.BootstrapMethods.setBootstrapMethods(BootstrapMethod[]) with null. + Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.redirectLocalVariables(LocalVariableGen[], InstructionHandle, InstructionHandle) with null. + Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.redirectExceptionHandlers(CodeExceptionGen[], InstructionHandle, InstructionHandle) with null. + Avoid NullPointerException calling org.apache.bcel.generic.InstructionList.findHandle(InstructionHandle[], int[], int, int) with null. + Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.setArgumentTypes(Type[]) with null. + Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.setArgumentNames(String[]) with null. + Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.removeRuntimeAttributes(Attribute[]) with null. + Avoid NullPointerException calling org.apache.bcel.generic.MethodGen.makeMutableVersion(AnnotationEntry[]) with null. + + Bump org.apache.commons:commons-parent from 66 to 69 #283, #297. + Bump org.jetbrains.kotlin:kotlin-stdlib from 1.9.22 to 1.9.23 #284. + Bump commons-io:commons-io from 2.15.1 to 2.16.1 #295, #300. + + + + Fix ConcurrentModificationException in org.apache.bcel.util.SyntheticRepository.getInstance() #275. + + Add Maven property project.build.outputTimestamp for build reproducibility. + + Bump GitHub various actions for CI builds. + Bump org.assertj:assertj-core from 3.25.1 to 3.25.2. + Bump org.apache.commons:commons-parent from 65 to 66. + Replace internal use of StringBuffer with StringBuilder. diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm index 7d1bcc9a02..ae8ae40b00 100644 --- a/src/changes/release-notes.vm +++ b/src/changes/release-notes.vm @@ -15,13 +15,13 @@ ## specific language governing permissions and limitations ## under the License. ## - ${project.name} - Version ${version} - RELEASE NOTES +${project.name} +Version ${version} +RELEASE NOTES -INTRODUCTION: - +Introduction +------------ The ${developmentTeam} is pleased to announce the release of ${project.name} ${version}. @@ -79,7 +79,7 @@ $action #else #set($dueto="") #end -o $issue ${action}$dueto +* $issue ${action}$dueto #end #set($action="") #set($issue="") @@ -90,9 +90,8 @@ o $issue ${action}$dueto No changes defined in this version. #else #if ($release.getActions('add').size() !=0) -NEW FEATURES: -============= - +New Features +------------ #foreach($actionItem in $release.getActions('add')) #processaction() #end @@ -100,9 +99,8 @@ NEW FEATURES: #end ## #if ($release.getActions('fix').size() !=0) -FIXED BUGS: -=========== - +Fixed Bugs +---------- #foreach($actionItem in $release.getActions('fix')) #processaction() #end @@ -110,9 +108,8 @@ FIXED BUGS: #end ## #if ($release.getActions('update').size() !=0) -CHANGES: -======== - +Changes +------- #foreach($actionItem in $release.getActions('update')) #processaction() #end @@ -120,8 +117,8 @@ CHANGES: #end ## #if ($release.getActions('remove').size() !=0) -REMOVED: -======== +Removed +------- #foreach($actionItem in $release.getActions('remove')) #processaction() #end @@ -129,7 +126,7 @@ REMOVED: ## End of main loop #end -Historical list of changes: ${project.url}changes-report.html +Historical list of changes: ${project.url}/changes-report.html For complete information on ${project.name}, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the ${project.name} website: @@ -143,7 +140,6 @@ Have fun! Feedback -------- - Open source works best when you give feedback: https://commons.apache.org/bcel diff --git a/src/conf/checkstyle-suppressions.xml b/src/conf/checkstyle-suppressions.xml index e0ef08d9c3..bf3c1e6815 100644 --- a/src/conf/checkstyle-suppressions.xml +++ b/src/conf/checkstyle-suppressions.xml @@ -22,11 +22,10 @@ limitations under the License. - - - + + diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml index 392e941bd7..21cee04dbc 100644 --- a/src/conf/checkstyle.xml +++ b/src/conf/checkstyle.xml @@ -63,7 +63,7 @@ limitations under the License. - + @@ -197,6 +197,10 @@ limitations under the License. - + + + + + diff --git a/src/examples/ListClass.java b/src/examples/ListClass.java index 3a7c91d65b..442f7ce85f 100644 --- a/src/examples/ListClass.java +++ b/src/examples/ListClass.java @@ -31,6 +31,7 @@ import org.apache.bcel.classfile.ConstantUtf8; import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.classfile.Method; +import org.apache.commons.lang3.stream.Streams; /** * Read class file(s) and display its contents. The command line usage is: @@ -193,27 +194,22 @@ public static void printClassDependencies(final ConstantPool pool) { * Dump the disassembled code of all methods in the class. */ public static void printCode(final Method[] methods, final boolean verbose) { - for (final Method method : methods) { + Streams.of(methods).forEach(method -> { System.out.println(method); - final Code code = method.getCode(); if (code != null) { System.out.println(code.toString(verbose)); } - } + }); } boolean code; boolean constants; boolean verbose; boolean classDep; - boolean noContents; - boolean recurse; - Map listedClasses; - List excludeName; public ListClass(final boolean code, final boolean constants, final boolean verbose, final boolean classDep, final boolean noContents, diff --git a/src/main/java/org/apache/bcel/Const.java b/src/main/java/org/apache/bcel/Const.java index edf739ae25..fd554493fd 100644 --- a/src/main/java/org/apache/bcel/Const.java +++ b/src/main/java/org/apache/bcel/Const.java @@ -3073,12 +3073,13 @@ public final class Const { public static final byte ATTR_MODULE_MAIN_CLASS = 24; public static final byte ATTR_NEST_HOST = 25; public static final byte ATTR_NEST_MEMBERS = 26; + public static final byte ATTR_RECORD = 27; - public static final short KNOWN_ATTRIBUTES = 27; // count of attributes + public static final short KNOWN_ATTRIBUTES = 28; // count of attributes private static final String[] ATTRIBUTE_NAMES = {"SourceFile", "ConstantValue", "Code", "Exceptions", "LineNumberTable", "LocalVariableTable", "InnerClasses", "Synthetic", "Deprecated", "PMGClass", "Signature", "StackMap", "RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations", "RuntimeVisibleParameterAnnotations", "RuntimeInvisibleParameterAnnotations", "AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", - "StackMapTable", "BootstrapMethods", "MethodParameters", "Module", "ModulePackages", "ModuleMainClass", "NestHost", "NestMembers"}; + "StackMapTable", "BootstrapMethods", "MethodParameters", "Module", "ModulePackages", "ModuleMainClass", "NestHost", "NestMembers", "Record"}; /** * Constants used in the StackMap attribute. */ diff --git a/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java b/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java index b3c2bb22b7..4f7aada295 100644 --- a/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java +++ b/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java @@ -23,6 +23,8 @@ import java.util.List; import java.util.stream.Stream; +import org.apache.commons.lang3.stream.Streams; + /** * Represents one annotation in the annotation table * @@ -32,10 +34,10 @@ public class AnnotationEntry implements Node { public static final AnnotationEntry[] EMPTY_ARRAY = {}; - public static AnnotationEntry[] createAnnotationEntries(final Attribute[] attrs) { + public static AnnotationEntry[] createAnnotationEntries(final Attribute[] attributes) { // Find attributes that contain annotation data - return Stream.of(attrs).filter(Annotations.class::isInstance).flatMap(e -> Stream.of(((Annotations) e).getAnnotationEntries())) - .toArray(AnnotationEntry[]::new); + return Streams.of(attributes).filter(Annotations.class::isInstance).flatMap(e -> Stream.of(((Annotations) e).getAnnotationEntries())) + .toArray(AnnotationEntry[]::new); } /** diff --git a/src/main/java/org/apache/bcel/classfile/Annotations.java b/src/main/java/org/apache/bcel/classfile/Annotations.java index 6ca224a93b..fab5d61247 100644 --- a/src/main/java/org/apache/bcel/classfile/Annotations.java +++ b/src/main/java/org/apache/bcel/classfile/Annotations.java @@ -47,7 +47,7 @@ public abstract class Annotations extends Attribute implements Iterable iterator() { * @param annotationTable the entries to set in this annotation */ public final void setAnnotationTable(final AnnotationEntry[] annotationTable) { - this.annotationTable = annotationTable; + this.annotationTable = annotationTable != null ? annotationTable : AnnotationEntry.EMPTY_ARRAY; } /** @@ -146,9 +143,6 @@ public final String toString() { } protected void writeAnnotations(final DataOutputStream dos) throws IOException { - if (annotationTable == null) { - return; - } dos.writeShort(annotationTable.length); for (final AnnotationEntry element : annotationTable) { element.dump(dos); diff --git a/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java b/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java index 13d4626414..d932b112e2 100644 --- a/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java +++ b/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java @@ -26,12 +26,12 @@ public class ArrayElementValue extends ElementValue { // For array types, this is the array private final ElementValue[] elementValues; - public ArrayElementValue(final int type, final ElementValue[] datums, final ConstantPool cpool) { + public ArrayElementValue(final int type, final ElementValue[] elementValues, final ConstantPool cpool) { super(type, cpool); if (type != ARRAY) { throw new ClassFormatException("Only element values of type array can be built with this ctor - type specified: " + type); } - this.elementValues = datums; + this.elementValues = elementValues != null ? elementValues : ElementValue.EMPTY_ARRAY; } @Override diff --git a/src/main/java/org/apache/bcel/classfile/Attribute.java b/src/main/java/org/apache/bcel/classfile/Attribute.java index 42510a9a11..0dd994c24b 100644 --- a/src/main/java/org/apache/bcel/classfile/Attribute.java +++ b/src/main/java/org/apache/bcel/classfile/Attribute.java @@ -191,6 +191,8 @@ public static Attribute readAttribute(final DataInput dataInput, final ConstantP return new NestHost(nameIndex, length, dataInput, constantPool); case Const.ATTR_NEST_MEMBERS: return new NestMembers(nameIndex, length, dataInput, constantPool); + case Const.ATTR_RECORD: + return new Record(nameIndex, length, dataInput, constantPool); default: // Never reached throw new IllegalStateException("Unrecognized attribute type tag parsed: " + tag); diff --git a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java b/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java index 5f2ec3dc6c..ff4b93b01a 100644 --- a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java +++ b/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java @@ -23,6 +23,7 @@ import java.util.Arrays; import org.apache.bcel.Const; +import org.apache.commons.lang3.ArrayUtils; /** * This class represents a bootstrap method attribute, i.e., the bootstrap method ref, the number of bootstrap arguments @@ -34,6 +35,8 @@ */ public class BootstrapMethod implements Cloneable { + static final BootstrapMethod[] EMPTY_ARRAY = {}; + /** Index of the CONSTANT_MethodHandle_info structure in the constant_pool table */ private int bootstrapMethodRef; @@ -74,7 +77,7 @@ private BootstrapMethod(final int bootstrapMethodRef, final int numBootstrapArgu */ public BootstrapMethod(final int bootstrapMethodRef, final int[] bootstrapArguments) { this.bootstrapMethodRef = bootstrapMethodRef; - this.bootstrapArguments = bootstrapArguments; + setBootstrapArguments(bootstrapArguments); } /** @@ -128,7 +131,7 @@ public int getNumBootstrapArguments() { * @param bootstrapArguments int[] indices into constant_pool of CONSTANT_[type]_info */ public void setBootstrapArguments(final int[] bootstrapArguments) { - this.bootstrapArguments = bootstrapArguments; + this.bootstrapArguments = ArrayUtils.nullToEmpty(bootstrapArguments); } /** diff --git a/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java b/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java index d44a1afad3..42af84eeac 100644 --- a/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java +++ b/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java @@ -54,7 +54,7 @@ public BootstrapMethods(final BootstrapMethods c) { */ public BootstrapMethods(final int nameIndex, final int length, final BootstrapMethod[] bootstrapMethods, final ConstantPool constantPool) { super(Const.ATTR_BOOTSTRAP_METHODS, nameIndex, length, constantPool); - this.bootstrapMethods = bootstrapMethods; + setBootstrapMethods(bootstrapMethods); } /** @@ -131,7 +131,7 @@ public Iterator iterator() { * @param bootstrapMethods the array of bootstrap methods */ public final void setBootstrapMethods(final BootstrapMethod[] bootstrapMethods) { - this.bootstrapMethods = bootstrapMethods; + this.bootstrapMethods = bootstrapMethods != null ? bootstrapMethods : BootstrapMethod.EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/ClassParser.java b/src/main/java/org/apache/bcel/classfile/ClassParser.java index d70f1e746a..9d3ccf799d 100644 --- a/src/main/java/org/apache/bcel/classfile/ClassParser.java +++ b/src/main/java/org/apache/bcel/classfile/ClassParser.java @@ -32,7 +32,7 @@ * appropriate exception is propagated back to the caller. * * The structure and the names comply, except for a few conveniences, exactly with the - * JVM specification 1.0. See this paper for further details about + * JVM specification 1.0. See this paper for further details about * the structure of a bytecode file. */ public final class ClassParser { diff --git a/src/main/java/org/apache/bcel/classfile/Code.java b/src/main/java/org/apache/bcel/classfile/Code.java index 72964af160..8ec211fba4 100644 --- a/src/main/java/org/apache/bcel/classfile/Code.java +++ b/src/main/java/org/apache/bcel/classfile/Code.java @@ -127,8 +127,8 @@ public Code(final int nameIndex, final int length, final int maxStack, final int super(Const.ATTR_CODE, nameIndex, length, constantPool); this.maxStack = Args.requireU2(maxStack, "maxStack"); this.maxLocals = Args.requireU2(maxLocals, "maxLocals"); - this.code = code != null ? code : ArrayUtils.EMPTY_BYTE_ARRAY; - this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_CODE_EXCEPTION_ARRAY; + this.code = ArrayUtils.nullToEmpty(code); + this.exceptionTable = ArrayUtils.nullToEmpty(exceptionTable, CodeException[].class); Args.requireU2(this.exceptionTable.length, "exceptionTable.length"); this.attributes = attributes != null ? attributes : EMPTY_ARRAY; super.setLength(calculateLength()); // Adjust length @@ -299,7 +299,7 @@ public void setAttributes(final Attribute[] attributes) { * @param code byte code */ public void setCode(final byte[] code) { - this.code = code != null ? code : ArrayUtils.EMPTY_BYTE_ARRAY; + this.code = ArrayUtils.nullToEmpty(code); super.setLength(calculateLength()); // Adjust length } @@ -307,7 +307,7 @@ public void setCode(final byte[] code) { * @param exceptionTable exception table */ public void setExceptionTable(final CodeException[] exceptionTable) { - this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_CODE_EXCEPTION_ARRAY; + this.exceptionTable = exceptionTable != null ? exceptionTable : CodeException.EMPTY_ARRAY; super.setLength(calculateLength()); // Adjust length } diff --git a/src/main/java/org/apache/bcel/classfile/CodeException.java b/src/main/java/org/apache/bcel/classfile/CodeException.java index 5171bcacf5..b8d4f0a9a9 100644 --- a/src/main/java/org/apache/bcel/classfile/CodeException.java +++ b/src/main/java/org/apache/bcel/classfile/CodeException.java @@ -55,7 +55,7 @@ public final class CodeException implements Cloneable, Node, Constants { /** * Empty array. */ - static final CodeException[] EMPTY_CODE_EXCEPTION_ARRAY = {}; + static final CodeException[] EMPTY_ARRAY = {}; /** Range in the code the exception handler. */ private int startPc; diff --git a/src/main/java/org/apache/bcel/classfile/Constant.java b/src/main/java/org/apache/bcel/classfile/Constant.java index 6ed876d058..c55601d8bc 100644 --- a/src/main/java/org/apache/bcel/classfile/Constant.java +++ b/src/main/java/org/apache/bcel/classfile/Constant.java @@ -30,6 +30,8 @@ */ public abstract class Constant implements Cloneable, Node { + static final Constant[] EMPTY_ARRAY = {}; + private static BCELComparator bcelComparator = new BCELComparator() { @Override diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPool.java b/src/main/java/org/apache/bcel/classfile/ConstantPool.java index e94f35dde5..a046dc5059 100644 --- a/src/main/java/org/apache/bcel/classfile/ConstantPool.java +++ b/src/main/java/org/apache/bcel/classfile/ConstantPool.java @@ -68,7 +68,7 @@ private static String escape(final String str) { * @param constantPool Array of constants */ public ConstantPool(final Constant[] constantPool) { - this.constantPool = constantPool; + setConstantPool(constantPool); } /** @@ -399,7 +399,7 @@ public ConstantUtf8 getConstantUtf8(final int index) throws ClassFormatException * @return Length of constant pool. */ public int getLength() { - return constantPool == null ? 0 : constantPool.length; + return constantPool.length; } @Override @@ -418,7 +418,7 @@ public void setConstant(final int index, final Constant constant) { * @param constantPool */ public void setConstantPool(final Constant[] constantPool) { - this.constantPool = constantPool; + this.constantPool = constantPool != null ? constantPool : Constant.EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java b/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java index c893a3948a..0bcff56f33 100644 --- a/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java +++ b/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java @@ -20,6 +20,8 @@ import java.util.Stack; import java.util.stream.Stream; +import org.apache.commons.lang3.stream.Streams; + /** * Traverses a JavaClass with another Visitor object 'piggy-backed' that is applied to all components of a JavaClass * object. I.e. this class supplies the traversal strategy, other classes can make use of it. @@ -41,7 +43,7 @@ public DescendingVisitor(final JavaClass clazz, final Visitor visitor) { } private void accept(final E[] node) { - Stream.of(node).forEach(e -> e.accept(this)); + Streams.of(node).forEach(e -> e.accept(this)); } /** @@ -502,6 +504,21 @@ public void visitParameterAnnotationEntry(final ParameterAnnotationEntry obj) { stack.pop(); } + @Override + public void visitRecord(final Record record) { + stack.push(record); + record.accept(visitor); + accept(record.getComponents()); + stack.pop(); + } + + @Override + public void visitRecordComponent(final RecordComponentInfo recordComponentInfo) { + stack.push(recordComponentInfo); + recordComponentInfo.accept(visitor); + stack.pop(); + } + @Override public void visitSignature(final Signature attribute) { stack.push(attribute); @@ -558,4 +575,5 @@ public void visitUnknown(final Unknown attribute) { attribute.accept(visitor); stack.pop(); } + } diff --git a/src/main/java/org/apache/bcel/classfile/ElementValue.java b/src/main/java/org/apache/bcel/classfile/ElementValue.java index 7bcd73bda0..5619f48623 100644 --- a/src/main/java/org/apache/bcel/classfile/ElementValue.java +++ b/src/main/java/org/apache/bcel/classfile/ElementValue.java @@ -63,6 +63,7 @@ public abstract class ElementValue { public static final byte PRIMITIVE_LONG = 'J'; public static final byte PRIMITIVE_SHORT = 'S'; public static final byte PRIMITIVE_BOOLEAN = 'Z'; + static final ElementValue[] EMPTY_ARRAY = {}; /** * Reads an {@code element_value} as an {@code ElementValue}. diff --git a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java b/src/main/java/org/apache/bcel/classfile/ExceptionTable.java index 6e1aaa23ec..3877b2f8e5 100644 --- a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java +++ b/src/main/java/org/apache/bcel/classfile/ExceptionTable.java @@ -82,7 +82,7 @@ public ExceptionTable(final ExceptionTable c) { */ public ExceptionTable(final int nameIndex, final int length, final int[] exceptionIndexTable, final ConstantPool constantPool) { super(Const.ATTR_EXCEPTIONS, nameIndex, length, constantPool); - this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : ArrayUtils.EMPTY_INT_ARRAY; + this.exceptionIndexTable = ArrayUtils.nullToEmpty(exceptionIndexTable); Args.requireU2(this.exceptionIndexTable.length, "exceptionIndexTable.length"); } @@ -153,7 +153,7 @@ public int getNumberOfExceptions() { * length. */ public void setExceptionIndexTable(final int[] exceptionIndexTable) { - this.exceptionIndexTable = exceptionIndexTable != null ? exceptionIndexTable : ArrayUtils.EMPTY_INT_ARRAY; + this.exceptionIndexTable = ArrayUtils.nullToEmpty(exceptionIndexTable); } /** diff --git a/src/main/java/org/apache/bcel/classfile/Field.java b/src/main/java/org/apache/bcel/classfile/Field.java index a7f002e0fa..0fd1582cff 100644 --- a/src/main/java/org/apache/bcel/classfile/Field.java +++ b/src/main/java/org/apache/bcel/classfile/Field.java @@ -50,11 +50,6 @@ public int hashCode(final Field o) { } }; - /** - * Empty array. - */ - static final Field[] EMPTY_FIELD_ARRAY = {}; - /** * @return Comparison strategy object. */ diff --git a/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java b/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java index 76f30617a6..1b2081ed9c 100644 --- a/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java +++ b/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java @@ -147,10 +147,8 @@ public final void dump(final DataOutputStream file) throws IOException { file.writeShort(name_index); file.writeShort(signature_index); file.writeShort(attributes_count); - if (attributes != null) { - for (final Attribute attribute : attributes) { - attribute.dump(file); - } + for (final Attribute attribute : attributes) { + attribute.dump(file); } } @@ -233,8 +231,8 @@ public final int getSignatureIndex() { * @param attributes Collection of object attributes. */ public final void setAttributes(final Attribute[] attributes) { - this.attributes = attributes; - this.attributes_count = attributes != null ? attributes.length : 0; // init deprecated field + this.attributes = attributes != null ? attributes : Attribute.EMPTY_ARRAY; + this.attributes_count = this.attributes.length; // init deprecated field } /** diff --git a/src/main/java/org/apache/bcel/classfile/InnerClasses.java b/src/main/java/org/apache/bcel/classfile/InnerClasses.java index 30788c404f..53b85b79ed 100644 --- a/src/main/java/org/apache/bcel/classfile/InnerClasses.java +++ b/src/main/java/org/apache/bcel/classfile/InnerClasses.java @@ -37,7 +37,7 @@ public final class InnerClasses extends Attribute implements Iterable iterator() { * @param innerClasses the array of inner classes */ public void setInnerClasses(final InnerClass[] innerClasses) { - this.innerClasses = innerClasses != null ? innerClasses : EMPTY_INNER_CLASSE_ARRAY; + this.innerClasses = innerClasses != null ? innerClasses : EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/JavaClass.java b/src/main/java/org/apache/bcel/classfile/JavaClass.java index 5bcd5c7e2c..d52336d011 100644 --- a/src/main/java/org/apache/bcel/classfile/JavaClass.java +++ b/src/main/java/org/apache/bcel/classfile/JavaClass.java @@ -133,8 +133,10 @@ public static void setComparator(final BCELComparator comparator) { private boolean isAnonymous; private boolean isNested; + private boolean isRecord; private boolean computedNestedTypeStatus; + private boolean computedRecord; /** * In cases where we go ahead and create something, use the default SyntheticRepository, because we don't know any @@ -182,17 +184,15 @@ public JavaClass(final int classNameIndex, final int superclassNameIndex, final public JavaClass(final int classNameIndex, final int superclassNameIndex, final String fileName, final int major, final int minor, final int accessFlags, final ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes, final byte source) { super(accessFlags); - if (interfaces == null) { - interfaces = ArrayUtils.EMPTY_INT_ARRAY; - } + interfaces = ArrayUtils.nullToEmpty(interfaces); if (attributes == null) { attributes = Attribute.EMPTY_ARRAY; } if (fields == null) { - fields = Field.EMPTY_FIELD_ARRAY; + fields = Field.EMPTY_ARRAY; } if (methods == null) { - methods = Method.EMPTY_METHOD_ARRAY; + methods = Method.EMPTY_ARRAY; } this.classNameIndex = classNameIndex; this.superclassNameIndex = superclassNameIndex; @@ -259,6 +259,19 @@ public int compareTo(final JavaClass obj) { return getClassName().compareTo(obj.getClassName()); } + private void computeIsRecord() { + if (computedRecord) { + return; + } + for (final Attribute attribute : this.attributes) { + if (attribute instanceof Record) { + isRecord = true; + break; + } + } + this.computedRecord = true; + } + private void computeNestedTypeStatus() { if (computedNestedTypeStatus) { return; @@ -743,6 +756,17 @@ public final boolean isNested() { return this.isNested; } + /** + * Tests whether this class was declared as a record + * + * @return true if a record attribute is present, false otherwise. + * @since 6.9.0 + */ + public boolean isRecord() { + computeIsRecord(); + return this.isRecord; + } + public final boolean isSuper() { return (super.getAccessFlags() & Const.ACC_SUPER) != 0; } @@ -751,7 +775,7 @@ public final boolean isSuper() { * @param attributes . */ public void setAttributes(final Attribute[] attributes) { - this.attributes = attributes; + this.attributes = attributes != null ? attributes : Attribute.EMPTY_ARRAY; } /** @@ -779,7 +803,7 @@ public void setConstantPool(final ConstantPool constantPool) { * @param fields . */ public void setFields(final Field[] fields) { - this.fields = fields; + this.fields = fields != null ? fields : Field.EMPTY_ARRAY; } /** @@ -793,14 +817,14 @@ public void setFileName(final String fileName) { * @param interfaceNames . */ public void setInterfaceNames(final String[] interfaceNames) { - this.interfaceNames = interfaceNames; + this.interfaceNames = ArrayUtils.nullToEmpty(interfaceNames); } /** * @param interfaces . */ public void setInterfaces(final int[] interfaces) { - this.interfaces = interfaces; + this.interfaces = ArrayUtils.nullToEmpty(interfaces); } /** @@ -814,7 +838,7 @@ public void setMajor(final int major) { * @param methods . */ public void setMethods(final Method[] methods) { - this.methods = methods; + this.methods = methods != null ? methods : Method.EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java b/src/main/java/org/apache/bcel/classfile/LineNumberTable.java index 929b5f1805..fe5a53d65b 100644 --- a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java +++ b/src/main/java/org/apache/bcel/classfile/LineNumberTable.java @@ -39,7 +39,7 @@ public final class LineNumberTable extends Attribute implements Iterable + * Note that both objects use the same references (shallow copy). Use copy() for a physical copy. + *

*/ public LineNumberTable(final LineNumberTable c) { this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool()); @@ -173,7 +174,7 @@ public int getSourceLine(final int pos) { } public int getTableLength() { - return lineNumberTable == null ? 0 : lineNumberTable.length; + return lineNumberTable.length; } @Override @@ -185,7 +186,7 @@ public Iterator iterator() { * @param lineNumberTable the line number entries for this table */ public void setLineNumberTable(final LineNumber[] lineNumberTable) { - this.lineNumberTable = lineNumberTable; + this.lineNumberTable = lineNumberTable != null ? lineNumberTable : LineNumber.EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java b/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java index 778932b620..b73e99c28f 100644 --- a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java +++ b/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java @@ -35,6 +35,8 @@ */ public class LocalVariableTable extends Attribute implements Iterable { + private static final LocalVariable[] EMPTY_ARRAY = {}; + private LocalVariable[] localVariableTable; // variables /** @@ -63,7 +65,7 @@ public class LocalVariableTable extends Attribute implements Iterable iterator() { } public final void setLocalVariableTable(final LocalVariable[] localVariableTable) { - this.localVariableTable = localVariableTable; + this.localVariableTable = localVariableTable != null ? localVariableTable : EMPTY_ARRAY; } /** diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java b/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java index 8a35c6ea20..8f4e4e8f29 100644 --- a/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java +++ b/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java @@ -60,14 +60,14 @@ */ public class LocalVariableTypeTable extends Attribute implements Iterable { + private static final LocalVariable[] EMPTY_ARRAY = {}; + private LocalVariable[] localVariableTypeTable; // variables LocalVariableTypeTable(final int nameIdx, final int len, final DataInput input, final ConstantPool cpool) throws IOException { this(nameIdx, len, (LocalVariable[]) null, cpool); - final int localVariableTypeTableLength = input.readUnsignedShort(); localVariableTypeTable = new LocalVariable[localVariableTypeTableLength]; - for (int i = 0; i < localVariableTypeTableLength; i++) { localVariableTypeTable[i] = new LocalVariable(input, cpool); } @@ -94,7 +94,6 @@ public void accept(final Visitor v) { @Override public Attribute copy(final ConstantPool constantPool) { final LocalVariableTypeTable c = (LocalVariableTypeTable) clone(); - c.localVariableTypeTable = new LocalVariable[localVariableTypeTable.length]; Arrays.setAll(c.localVariableTypeTable, i -> localVariableTypeTable[i].copy()); c.setConstantPool(constantPool); @@ -116,7 +115,6 @@ public final LocalVariable getLocalVariable(final int index) { return variable; } } - return null; } @@ -134,7 +132,7 @@ public Iterator iterator() { } public final void setLocalVariableTable(final LocalVariable[] localVariableTable) { - this.localVariableTypeTable = localVariableTable; + this.localVariableTypeTable = localVariableTable != null ? localVariableTable : EMPTY_ARRAY; } /** @@ -143,15 +141,12 @@ public final void setLocalVariableTable(final LocalVariable[] localVariableTable @Override public final String toString() { final StringBuilder buf = new StringBuilder(); - for (int i = 0; i < localVariableTypeTable.length; i++) { buf.append(localVariableTypeTable[i].toStringShared(true)); - if (i < localVariableTypeTable.length - 1) { buf.append('\n'); } } - return buf.toString(); } } diff --git a/src/main/java/org/apache/bcel/classfile/Method.java b/src/main/java/org/apache/bcel/classfile/Method.java index 84d7e4751d..57a70ff8e7 100644 --- a/src/main/java/org/apache/bcel/classfile/Method.java +++ b/src/main/java/org/apache/bcel/classfile/Method.java @@ -49,11 +49,6 @@ public int hashCode(final Method o) { } }; - /** - * Empty array. - */ - static final Method[] EMPTY_METHOD_ARRAY = {}; - /** * @return Comparison strategy object. */ diff --git a/src/main/java/org/apache/bcel/classfile/MethodParameters.java b/src/main/java/org/apache/bcel/classfile/MethodParameters.java index e6152ae69a..0799c21284 100644 --- a/src/main/java/org/apache/bcel/classfile/MethodParameters.java +++ b/src/main/java/org/apache/bcel/classfile/MethodParameters.java @@ -38,13 +38,12 @@ public class MethodParameters extends Attribute implements Iterable parameters[i].copy()); c.setConstantPool(constantPool); return c; @@ -92,6 +90,6 @@ public Iterator iterator() { } public void setParameters(final MethodParameter[] parameters) { - this.parameters = parameters; + this.parameters = parameters != null ? parameters : EMPTY_ARRAY; } } diff --git a/src/main/java/org/apache/bcel/classfile/ModulePackages.java b/src/main/java/org/apache/bcel/classfile/ModulePackages.java index fef3a632ba..ade6cb329f 100644 --- a/src/main/java/org/apache/bcel/classfile/ModulePackages.java +++ b/src/main/java/org/apache/bcel/classfile/ModulePackages.java @@ -62,7 +62,7 @@ public final class ModulePackages extends Attribute { */ public ModulePackages(final int nameIndex, final int length, final int[] packageIndexTable, final ConstantPool constantPool) { super(Const.ATTR_MODULE_PACKAGES, nameIndex, length, constantPool); - this.packageIndexTable = packageIndexTable != null ? packageIndexTable : ArrayUtils.EMPTY_INT_ARRAY; + this.packageIndexTable = ArrayUtils.nullToEmpty(packageIndexTable); Args.requireU2(this.packageIndexTable.length, "packageIndexTable.length"); } @@ -142,7 +142,7 @@ public String[] getPackageNames() { * @param packageIndexTable the list of package indexes Also redefines number_of_packages according to table length. */ public void setPackageIndexTable(final int[] packageIndexTable) { - this.packageIndexTable = packageIndexTable != null ? packageIndexTable : ArrayUtils.EMPTY_INT_ARRAY; + this.packageIndexTable = ArrayUtils.nullToEmpty(packageIndexTable); } /** diff --git a/src/main/java/org/apache/bcel/classfile/NestMembers.java b/src/main/java/org/apache/bcel/classfile/NestMembers.java index e9b15593c1..3449148cd0 100644 --- a/src/main/java/org/apache/bcel/classfile/NestMembers.java +++ b/src/main/java/org/apache/bcel/classfile/NestMembers.java @@ -63,7 +63,7 @@ public final class NestMembers extends Attribute { */ public NestMembers(final int nameIndex, final int length, final int[] classes, final ConstantPool constantPool) { super(Const.ATTR_NEST_MEMBERS, nameIndex, length, constantPool); - this.classes = classes != null ? classes : ArrayUtils.EMPTY_INT_ARRAY; + this.classes = ArrayUtils.nullToEmpty(classes); Args.requireU2(this.classes.length, "classes.length"); } @@ -143,7 +143,7 @@ public int getNumberClasses() { * @param classes the list of class indexes Also redefines number_of_classes according to table length. */ public void setClasses(final int[] classes) { - this.classes = classes != null ? classes : ArrayUtils.EMPTY_INT_ARRAY; + this.classes = ArrayUtils.nullToEmpty(classes); } /** diff --git a/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java b/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java index 563ff6b091..70f6236e14 100644 --- a/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java +++ b/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java @@ -32,16 +32,22 @@ public class ParameterAnnotationEntry implements Node { static final ParameterAnnotationEntry[] EMPTY_ARRAY = {}; - public static ParameterAnnotationEntry[] createParameterAnnotationEntries(final Attribute[] attrs) { + public static ParameterAnnotationEntry[] createParameterAnnotationEntries(final Attribute[] attributes) { + if (attributes == null) { + return EMPTY_ARRAY; + } // Find attributes that contain parameter annotation data - final List accumulatedAnnotations = new ArrayList<>(attrs.length); - for (final Attribute attribute : attrs) { + final List accumulatedAnnotations = new ArrayList<>(attributes.length); + for (final Attribute attribute : attributes) { if (attribute instanceof ParameterAnnotations) { final ParameterAnnotations runtimeAnnotations = (ParameterAnnotations) attribute; - Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getParameterAnnotationEntries()); + final ParameterAnnotationEntry[] parameterAnnotationEntries = runtimeAnnotations.getParameterAnnotationEntries(); + if (parameterAnnotationEntries != null) { + Collections.addAll(accumulatedAnnotations, parameterAnnotationEntries); + } } } - return accumulatedAnnotations.toArray(ParameterAnnotationEntry.EMPTY_ARRAY); + return accumulatedAnnotations.toArray(EMPTY_ARRAY); } private final AnnotationEntry[] annotationTable; diff --git a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java index d7a9a20d08..4120521d1c 100644 --- a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java @@ -29,10 +29,14 @@ */ public abstract class ParameterAnnotations extends Attribute implements Iterable { + private static final ParameterAnnotationEntry[] EMPTY_ARRAY = {}; + /** Table of parameter annotations */ private ParameterAnnotationEntry[] parameterAnnotationTable; /** + * Constructs a new instance. + * * @param parameterAnnotationType the subclass type of the parameter annotation * @param nameIndex Index pointing to the name Code * @param length Content length in bytes @@ -50,6 +54,8 @@ public abstract class ParameterAnnotations extends Attribute implements Iterable } /** + * Constructs a new instance. + * * @param parameterAnnotationType the subclass type of the parameter annotation * @param nameIndex Index pointing to the name Code * @param length Content length in bytes @@ -115,6 +121,6 @@ public Iterator iterator() { * @param parameterAnnotationTable the entries to set in this parameter annotation */ public final void setParameterAnnotationTable(final ParameterAnnotationEntry[] parameterAnnotationTable) { - this.parameterAnnotationTable = parameterAnnotationTable; + this.parameterAnnotationTable = parameterAnnotationTable != null ? parameterAnnotationTable : EMPTY_ARRAY; } } diff --git a/src/main/java/org/apache/bcel/classfile/Record.java b/src/main/java/org/apache/bcel/classfile/Record.java new file mode 100644 index 0000000000..0ba9c491d9 --- /dev/null +++ b/src/main/java/org/apache/bcel/classfile/Record.java @@ -0,0 +1,149 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.bcel.classfile; + +import java.io.DataInput; +import java.io.DataOutputStream; +import java.io.IOException; + +import org.apache.bcel.Const; +import org.apache.bcel.util.Args; + +/** + * Extends {@link Attribute} and records the classes and + * interfaces that are authorized to claim membership in the nest hosted by the + * current class or interface. There may be at most one Record attribute in a + * ClassFile structure. + * + * @see Attribute + * @since 6.9.0 + */ +public final class Record extends Attribute { + + private static final RecordComponentInfo[] EMPTY_RCI_ARRAY = {}; + + private static RecordComponentInfo[] readComponents(final DataInput input, final ConstantPool constantPool) + throws IOException { + final int classCount = input.readUnsignedShort(); + final RecordComponentInfo[] components = new RecordComponentInfo[classCount]; + for (int i = 0; i < classCount; i++) { + components[i] = new RecordComponentInfo(input, constantPool); + } + return components; + } + + private RecordComponentInfo[] components; + + /** + * Constructs object from input stream. + * + * @param nameIndex Index in constant pool + * @param length Content length in bytes + * @param input Input stream + * @param constantPool Array of constants + * @throws IOException if an I/O error occurs. + */ + Record(final int nameIndex, final int length, final DataInput input, final ConstantPool constantPool) + throws IOException { + this(nameIndex, length, readComponents(input, constantPool), constantPool); + } + + /** + * Constructs a new instance using components. + * + * @param nameIndex Index in constant pool + * @param length Content length in bytes + * @param classes Array of Record Component Info elements + * @param constantPool Array of constants + */ + public Record(final int nameIndex, final int length, final RecordComponentInfo[] classes, + final ConstantPool constantPool) { + super(Const.ATTR_RECORD, nameIndex, length, constantPool); + this.components = classes != null ? classes : EMPTY_RCI_ARRAY; + Args.requireU2(this.components.length, "attributes.length"); + } + + /** + * Called by objects that are traversing the nodes of the tree implicitly + * defined by the contents of a Java class. For example, the hierarchy of methods, + * fields, attributes, etc. spawns a tree of objects. + * + * @param v Visitor object + */ + @Override + public void accept(final Visitor v) { + v.visitRecord(this); + } + + /** + * Copies this instance and its components. + * + * @return a deep copy of this instance and its components. + */ + @Override + public Attribute copy(final ConstantPool constantPool) { + final Record c = (Record) clone(); + if (components.length > 0) { + c.components = components.clone(); + } + c.setConstantPool(constantPool); + return c; + } + + /** + * Dumps this instance into a file stream in binary format. + * + * @param file output stream. + * @throws IOException if an I/O error occurs. + */ + @Override + public void dump(final DataOutputStream file) throws IOException { + super.dump(file); + file.writeShort(components.length); + for (final RecordComponentInfo component : components) { + component.dump(file); + } + } + + /** + * Gets all the record components. + * + * @return array of Record Component Info elements. + */ + public RecordComponentInfo[] getComponents() { + return components; + } + + /** + * Converts this instance to a String suitable for debugging. + * + * @return String a String suitable for debugging. + */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder(); + buf.append("Record("); + buf.append(components.length); + buf.append("):\n"); + for (final RecordComponentInfo component : components) { + buf.append(" ").append(component.toString()).append("\n"); + } + return buf.substring(0, buf.length() - 1); // remove the last newline + } + +} diff --git a/src/main/java/org/apache/bcel/classfile/RecordComponentInfo.java b/src/main/java/org/apache/bcel/classfile/RecordComponentInfo.java new file mode 100644 index 0000000000..af3d85523b --- /dev/null +++ b/src/main/java/org/apache/bcel/classfile/RecordComponentInfo.java @@ -0,0 +1,135 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.bcel.classfile; + +import java.io.DataInput; +import java.io.DataOutputStream; +import java.io.IOException; + +import org.apache.bcel.Const; + +/** + * Record component info from a record. Instances from this class maps + * every component from a given record. + * + * @see + * The Java Virtual Machine Specification, Java SE 14 Edition, Records (preview) + * @since 6.9.0 + */ +public class RecordComponentInfo implements Node { + + private final int index; + private final int descriptorIndex; + private final Attribute[] attributes; + private final ConstantPool constantPool; + + /** + * Constructs a new instance from an input stream. + * + * @param input Input stream + * @param constantPool Array of constants + * @throws IOException if an I/O error occurs. + */ + public RecordComponentInfo(final DataInput input, final ConstantPool constantPool) throws IOException { + this.index = input.readUnsignedShort(); + this.descriptorIndex = input.readUnsignedShort(); + final int attributesCount = input.readUnsignedShort(); + this.attributes = new Attribute[attributesCount]; + for (int j = 0; j < attributesCount; j++) { + attributes[j] = Attribute.readAttribute(input, constantPool); + } + this.constantPool = constantPool; + } + + @Override + public void accept(final Visitor v) { + v.visitRecordComponent(this); + } + + /** + * Dumps contents into a file stream in binary format. + * + * @param file Output file stream + * @throws IOException if an I/O error occurs. + */ + public void dump(final DataOutputStream file) throws IOException { + file.writeShort(index); + file.writeShort(descriptorIndex); + file.writeShort(attributes.length); + for (final Attribute attribute : attributes) { + attribute.dump(file); + } + } + + /** + * Gets all attributes. + * + * @return all attributes. + */ + public Attribute[] getAttributes() { + return attributes; + } + + /** + * Gets the constant pool. + * + * @return Constant pool. + */ + public ConstantPool getConstantPool() { + return constantPool; + } + + /** + * Gets the description index. + * + * @return index in constant pool of this record component descriptor. + */ + public int getDescriptorIndex() { + return descriptorIndex; + } + + /** + * Gets the name index. + * + * @return index in constant pool of this record component name. + */ + public int getIndex() { + return index; + } + + /** + * Converts this instance to a String suitable for debugging. + * + * @return a String suitable for debugging. + */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder(); + buf.append("RecordComponentInfo("); + buf.append(constantPool.getConstantString(index, Const.CONSTANT_Utf8)); + buf.append(","); + buf.append(constantPool.getConstantString(descriptorIndex, Const.CONSTANT_Utf8)); + buf.append(","); + buf.append(attributes.length); + buf.append("):\n"); + for (final Attribute attribute : attributes) { + buf.append(" ").append(attribute.toString()).append("\n"); + } + return buf.substring(0, buf.length() - 1); // remove the last newline + } + +} diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java index 0cdfa5fd6e..1c087ed19f 100644 --- a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java @@ -23,13 +23,15 @@ import org.apache.bcel.Const; /** - * represents an annotation that is represented in the class file but is not provided to the JVM. + * An annotation that is represented in the class file but is not provided to the JVM. * * @since 6.0 */ public class RuntimeInvisibleAnnotations extends Annotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name Code * @param length Content length in bytes * @param input Input stream @@ -41,7 +43,9 @@ public RuntimeInvisibleAnnotations(final int nameIndex, final int length, final } /** - * @return deep copy of this attribute + * Creates a deep copy of this attribute. + * + * @return deep copy of this attribute. */ @Override public Attribute copy(final ConstantPool constantPool) { diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java index 9fb84b96a6..44ff1bed45 100644 --- a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java @@ -29,6 +29,8 @@ public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name Code * @param length Content length in bytes * @param input Input stream diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java index f17dd8e994..071e28659f 100644 --- a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java @@ -23,13 +23,15 @@ import org.apache.bcel.Const; /** - * represents an annotation that is represented in the class file and is provided to the JVM. + * An annotation that is represented in the class file and is provided to the JVM. * * @since 6.0 */ public class RuntimeVisibleAnnotations extends Annotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name Code * @param length Content length in bytes * @param input Input stream @@ -41,7 +43,9 @@ public RuntimeVisibleAnnotations(final int nameIndex, final int length, final Da } /** - * @return deep copy of this attribute + * Creates a deep copy of this attribute. + * + * @return deep copy of this attribute. */ @Override public Attribute copy(final ConstantPool constantPool) { diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java index 299627bcb4..ad9d662596 100644 --- a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java +++ b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java @@ -29,6 +29,8 @@ public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations { /** + * Constructs a new instance. + * * @param nameIndex Index pointing to the name Code * @param length Content length in bytes * @param input Input stream diff --git a/src/main/java/org/apache/bcel/classfile/StackMap.java b/src/main/java/org/apache/bcel/classfile/StackMap.java index 9814e7bbf6..1176f80ef7 100644 --- a/src/main/java/org/apache/bcel/classfile/StackMap.java +++ b/src/main/java/org/apache/bcel/classfile/StackMap.java @@ -26,8 +26,8 @@ /** * This class represents a stack map attribute used for preverification of Java classes for the - * Java 2 Micro Edition (J2ME). This attribute is used by the - * KVM and contained within the Code attribute of a method. See CLDC + * Java 2 Micro Edition (J2ME). This attribute is used by the + * KVM and contained within the Code attribute of a method. See CLDC * specification �5.3.1.2 * *
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapEntry.java b/src/main/java/org/apache/bcel/classfile/StackMapEntry.java
index 4afe9c0f4f..ca2d7bdee5 100644
--- a/src/main/java/org/apache/bcel/classfile/StackMapEntry.java
+++ b/src/main/java/org/apache/bcel/classfile/StackMapEntry.java
@@ -224,7 +224,6 @@ public int getFrameType() {
 
     /**
      * Calculate stack map entry size
-     *
      */
     int getMapEntrySize() {
         if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {
diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java b/src/main/java/org/apache/bcel/classfile/Utility.java
index 691577e06f..76fc8932ab 100644
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ b/src/main/java/org/apache/bcel/classfile/Utility.java
@@ -37,6 +37,7 @@
 
 import org.apache.bcel.Const;
 import org.apache.bcel.util.ByteSequence;
+import org.apache.commons.lang3.ArrayFill;
 import org.apache.commons.lang3.ArrayUtils;
 
 /**
@@ -715,8 +716,7 @@ public static String encode(byte[] bytes, final boolean compress) throws IOExcep
      */
     public static String fillup(final String str, final int length, final boolean leftJustify, final char fill) {
         final int len = length - str.length();
-        final char[] buf = new char[Math.max(len, 0)];
-        Arrays.fill(buf, fill);
+        final char[] buf = ArrayFill.fill(new char[Math.max(len, 0)], fill);
         if (leftJustify) {
             return str + new String(buf);
         }
@@ -1169,7 +1169,7 @@ public static String signatureToString(final String signature, final boolean cho
             type = typeParams + typeSignaturesToString(signature.substring(index), chopit, ')');
             index += unwrap(CONSUMER_CHARS); // update position
             // add return type
-            type = type + typeSignatureToString(signature.substring(index), chopit);
+            type += typeSignatureToString(signature.substring(index), chopit);
             index += unwrap(CONSUMER_CHARS); // update position
             // ignore any throws information in the signature
             return type;
diff --git a/src/main/java/org/apache/bcel/classfile/Visitor.java b/src/main/java/org/apache/bcel/classfile/Visitor.java
index 4f4b5c2116..3f0a7b3cf8 100644
--- a/src/main/java/org/apache/bcel/classfile/Visitor.java
+++ b/src/main/java/org/apache/bcel/classfile/Visitor.java
@@ -212,11 +212,32 @@ default void visitNestMembers(final NestMembers obj) {
      */
     void visitParameterAnnotation(ParameterAnnotations obj);
 
+
     /**
      * @since 6.0
      */
     void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
 
+    /**
+     * Visits a {@link Record} object.
+     *
+     * @param obj Record to visit
+     * @since 6.9.0
+     */
+    default void visitRecord(final Record obj) {
+        // empty
+    }
+
+    /**
+     * Visits a {@link RecordComponentInfo} object.
+     *
+     * @param record component to visit
+     * @since 6.9.0
+     */
+    default void visitRecordComponent(final RecordComponentInfo record) {
+     // noop
+    }
+
     void visitSignature(Signature obj);
 
     void visitSourceFile(SourceFile obj);
@@ -227,6 +248,7 @@ default void visitNestMembers(final NestMembers obj) {
 
     /**
      * Visits a {@link StackMapType} object.
+     *
      * @param obj object to visit
      * @since 6.8.0
      */
@@ -237,4 +259,5 @@ default void visitStackMapType(final StackMapType obj) {
     void visitSynthetic(Synthetic obj);
 
     void visitUnknown(Unknown obj);
+
 }
diff --git a/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java b/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
index 603404a213..e0e04ec4aa 100644
--- a/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
+++ b/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import org.apache.bcel.classfile.AnnotationEntry;
 import org.apache.bcel.classfile.Attribute;
@@ -33,6 +34,8 @@
 import org.apache.bcel.classfile.RuntimeInvisibleParameterAnnotations;
 import org.apache.bcel.classfile.RuntimeVisibleAnnotations;
 import org.apache.bcel.classfile.RuntimeVisibleParameterAnnotations;
+import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.stream.Streams;
 
 /**
  * @since 6.0
@@ -48,7 +51,7 @@ public class AnnotationEntryGen {
      * @param annotationEntryGens An array of AnnotationGen objects
      */
     static Attribute[] getAnnotationAttributes(final ConstantPoolGen cp, final AnnotationEntryGen[] annotationEntryGens) {
-        if (annotationEntryGens.length == 0) {
+        if (ArrayUtils.isEmpty(annotationEntryGens)) {
             return Attribute.EMPTY_ARRAY;
         }
 
@@ -250,11 +253,7 @@ public void addElementNameValuePair(final ElementValuePairGen evp) {
     }
 
     private List copyValues(final ElementValuePair[] in, final ConstantPoolGen cpool, final boolean copyPoolEntries) {
-        final List out = new ArrayList<>();
-        for (final ElementValuePair nvp : in) {
-            out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries));
-        }
-        return out;
+        return Streams.of(in).map(nvp -> new ElementValuePairGen(nvp, cpool, copyPoolEntries)).collect(Collectors.toList());
     }
 
     public void dump(final DataOutputStream dos) throws IOException {
diff --git a/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java b/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
index 744a1ce8ae..21442263d5 100644
--- a/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
+++ b/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
@@ -20,9 +20,11 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import org.apache.bcel.classfile.ArrayElementValue;
 import org.apache.bcel.classfile.ElementValue;
+import org.apache.commons.lang3.stream.Streams;
 
 /**
  * @since 6.0
@@ -50,15 +52,12 @@ public ArrayElementValueGen(final ConstantPoolGen cp) {
         evalues = new ArrayList<>();
     }
 
-    public ArrayElementValueGen(final int type, final ElementValue[] datums, final ConstantPoolGen cpool) {
+    public ArrayElementValueGen(final int type, final ElementValue[] elementValues, final ConstantPoolGen cpool) {
         super(type, cpool);
         if (type != ARRAY) {
             throw new IllegalArgumentException("Only element values of type array can be built with this ctor - type specified: " + type);
         }
-        this.evalues = new ArrayList<>();
-        for (final ElementValue datum : datums) {
-            evalues.add(ElementValueGen.copy(datum, cpool, true));
-        }
+        this.evalues = Streams.of(elementValues).map(e -> ElementValueGen.copy(e, cpool, true)).collect(Collectors.toList());
     }
 
     public void addElement(final ElementValueGen gen) {
diff --git a/src/main/java/org/apache/bcel/generic/ClassGen.java b/src/main/java/org/apache/bcel/generic/ClassGen.java
index b612050a93..e961cbcb54 100644
--- a/src/main/java/org/apache/bcel/generic/ClassGen.java
+++ b/src/main/java/org/apache/bcel/generic/ClassGen.java
@@ -95,7 +95,7 @@ public static void setComparator(final BCELComparator comparator) {
     private List observers;
 
     /**
-     * Initialize with existing class.
+     * Constructs a new instance from an existing class.
      *
      * @param clazz JavaClass object (e.g. read from file)
      */
@@ -112,15 +112,26 @@ public ClassGen(final JavaClass clazz) {
         final Attribute[] attributes = clazz.getAttributes();
         // J5TODO: Could make unpacking lazy, done on first reference
         final AnnotationEntryGen[] annotations = unpackAnnotations(attributes);
-        Collections.addAll(interfaceList, clazz.getInterfaceNames());
-        for (final Attribute attribute : attributes) {
-            if (!(attribute instanceof Annotations)) {
-                addAttribute(attribute);
+        final String[] interfaceNames = clazz.getInterfaceNames();
+        if (interfaceNames != null) {
+            Collections.addAll(interfaceList, interfaceNames);
+        }
+        if (attributes != null) {
+            for (final Attribute attribute : attributes) {
+                if (!(attribute instanceof Annotations)) {
+                    addAttribute(attribute);
+                }
             }
         }
         Collections.addAll(annotationList, annotations);
-        Collections.addAll(methodList, clazz.getMethods());
-        Collections.addAll(fieldList, clazz.getFields());
+        final Method[] methods = clazz.getMethods();
+        if (methods != null) {
+            Collections.addAll(methodList, methods);
+        }
+        final Field[] fields = clazz.getFields();
+        if (fields != null) {
+            Collections.addAll(fieldList, fields);
+        }
     }
 
     /**
@@ -486,7 +497,9 @@ public void setMethodAt(final Method method, final int pos) {
 
     public void setMethods(final Method[] methods) {
         methodList.clear();
-        Collections.addAll(methodList, methods);
+        if (methods != null) {
+            Collections.addAll(methodList, methods);
+        }
     }
 
     /**
@@ -509,17 +522,19 @@ public void setSuperclassNameIndex(final int superclassNameIndex) {
     }
 
     /**
-     * Look for attributes representing annotations and unpack them.
+     * Unpacks attributes representing annotations.
      */
-    private AnnotationEntryGen[] unpackAnnotations(final Attribute[] attrs) {
+    private AnnotationEntryGen[] unpackAnnotations(final Attribute[] attributes) {
         final List annotationGenObjs = new ArrayList<>();
-        for (final Attribute attr : attrs) {
-            if (attr instanceof RuntimeVisibleAnnotations) {
-                final RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr;
-                rva.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false)));
-            } else if (attr instanceof RuntimeInvisibleAnnotations) {
-                final RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr;
-                ria.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false)));
+        if (attributes != null) {
+            for (final Attribute attr : attributes) {
+                if (attr instanceof RuntimeVisibleAnnotations) {
+                    final RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr;
+                    rva.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false)));
+                } else if (attr instanceof RuntimeInvisibleAnnotations) {
+                    final RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr;
+                    ria.forEach(a -> annotationGenObjs.add(new AnnotationEntryGen(a, getConstantPool(), false)));
+                }
             }
         }
         return annotationGenObjs.toArray(AnnotationEntryGen.EMPTY_ARRAY);
diff --git a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java b/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
index 9f6c5b2d5d..9b6fbabedf 100644
--- a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
+++ b/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
@@ -62,8 +62,10 @@ protected FieldGenOrMethodGen(final int accessFlags) { // TODO could this be pac
         super(accessFlags);
     }
 
-    protected void addAll(final Attribute[] attrs) {
-        Collections.addAll(attributeList, attrs);
+    protected void addAll(final Attribute[] attributes) {
+        if (attributes != null) {
+            Collections.addAll(attributeList, attributes);
+        }
     }
 
     /**
diff --git a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java b/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
index 1075e06237..80fd33af9f 100644
--- a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
+++ b/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
@@ -48,7 +48,6 @@ protected FieldOrMethod(final short opcode, final int index) {
      *             generated by Java 1.5, this answer is sometimes wrong (e.g., if the "clone()" method is called on an
      *             array). A better idea is to use the {@link #getReferenceType(ConstantPoolGen)} method, which correctly
      *             distinguishes between class types and array types.
-     *
      */
     @Deprecated
     public String getClassName(final ConstantPoolGen cpg) {
diff --git a/src/main/java/org/apache/bcel/generic/InstructionFactory.java b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
index 2f1f91323b..90c82cfdcd 100644
--- a/src/main/java/org/apache/bcel/generic/InstructionFactory.java
+++ b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
@@ -640,8 +640,10 @@ public InvokeInstruction createInvoke(final String className, final String name,
         int index;
         int nargs = 0;
         final String signature = Type.getMethodSignature(retType, argTypes);
-        for (final Type argType : argTypes) {
-            nargs += argType.getSize();
+        if (argTypes != null) {
+            for (final Type argType : argTypes) {
+                nargs += argType.getSize();
+            }
         }
         if (useInterface) {
             index = cp.addInterfaceMethodref(className, name, signature);
diff --git a/src/main/java/org/apache/bcel/generic/InstructionList.java b/src/main/java/org/apache/bcel/generic/InstructionList.java
index ca053e4418..0f4340b70f 100644
--- a/src/main/java/org/apache/bcel/generic/InstructionList.java
+++ b/src/main/java/org/apache/bcel/generic/InstructionList.java
@@ -31,6 +31,7 @@
 import org.apache.bcel.classfile.Constant;
 import org.apache.bcel.util.ByteSequence;
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.stream.Streams;
 
 /**
  * This class is a container for a list of Instruction objects. Instructions can be
@@ -57,23 +58,25 @@ public class InstructionList implements Iterable {
      * @return target position's instruction handle if available
      */
     public static InstructionHandle findHandle(final InstructionHandle[] ihs, final int[] pos, final int count, final int target) {
-        int l = 0;
-        int r = count - 1;
-        /*
-         * Do a binary search since the pos array is orderd.
-         */
-        do {
-            final int i = l + r >>> 1;
-            final int j = pos[i];
-            if (j == target) {
-                return ihs[i];
-            }
-            if (target < j) {
-                r = i - 1;
-            } else {
-                l = i + 1;
-            }
-        } while (l <= r);
+        if (ihs != null && pos != null) {
+            int l = 0;
+            int r = count - 1;
+            /*
+             * Do a binary search since the pos array is orderd.
+             */
+            do {
+                final int i = l + r >>> 1;
+                final int j = pos[i];
+                if (j == target) {
+                    return ihs[i];
+                }
+                if (target < j) {
+                    r = i - 1;
+                } else {
+                    l = i + 1;
+                }
+            } while (l <= r);
+        }
         return null;
     }
 
@@ -956,7 +959,7 @@ public void redirectBranches(final InstructionHandle oldTarget, final Instructio
      * @see MethodGen
      */
     public void redirectExceptionHandlers(final CodeExceptionGen[] exceptions, final InstructionHandle oldTarget, final InstructionHandle newTarget) {
-        for (final CodeExceptionGen exception : exceptions) {
+        Streams.of(exceptions).forEach(exception -> {
             if (exception.getStartPC() == oldTarget) {
                 exception.setStartPC(newTarget);
             }
@@ -966,7 +969,7 @@ public void redirectExceptionHandlers(final CodeExceptionGen[] exceptions, final
             if (exception.getHandlerPC() == oldTarget) {
                 exception.setHandlerPC(newTarget);
             }
-        }
+        });
     }
 
     /**
@@ -978,16 +981,14 @@ public void redirectExceptionHandlers(final CodeExceptionGen[] exceptions, final
      * @see MethodGen
      */
     public void redirectLocalVariables(final LocalVariableGen[] lg, final InstructionHandle oldTarget, final InstructionHandle newTarget) {
-        for (final LocalVariableGen element : lg) {
-            final InstructionHandle start = element.getStart();
-            final InstructionHandle end = element.getEnd();
-            if (start == oldTarget) {
+        Streams.of(lg).forEach(element -> {
+            if (element.getStart() == oldTarget) {
                 element.setStart(newTarget);
             }
-            if (end == oldTarget) {
+            if (element.getEnd() == oldTarget) {
                 element.setEnd(newTarget);
             }
-        }
+        });
     }
 
     /**
diff --git a/src/main/java/org/apache/bcel/generic/MethodGen.java b/src/main/java/org/apache/bcel/generic/MethodGen.java
index 1cccda44a9..0f3cc8c95a 100644
--- a/src/main/java/org/apache/bcel/generic/MethodGen.java
+++ b/src/main/java/org/apache/bcel/generic/MethodGen.java
@@ -24,6 +24,7 @@
 import java.util.List;
 import java.util.Objects;
 import java.util.Stack;
+import java.util.stream.Collectors;
 
 import org.apache.bcel.Const;
 import org.apache.bcel.classfile.AnnotationEntry;
@@ -44,6 +45,7 @@
 import org.apache.bcel.classfile.Utility;
 import org.apache.bcel.util.BCELComparator;
 import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.stream.Streams;
 
 /**
  * Template class for building up a method. This is done by defining exception handlers, adding thrown exceptions, local
@@ -893,11 +895,7 @@ public int hashCode() {
     }
 
     private List makeMutableVersion(final AnnotationEntry[] mutableArray) {
-        final List result = new ArrayList<>();
-        for (final AnnotationEntry element : mutableArray) {
-            result.add(new AnnotationEntryGen(element, getConstantPool(), false));
-        }
-        return result;
+        return Streams.of(mutableArray).map(ae -> new AnnotationEntryGen(ae, getConstantPool(), false)).collect(Collectors.toList());
     }
 
     /**
@@ -1023,10 +1021,8 @@ public void removeObserver(final MethodObserver o) {
      *
      * @since 6.5.0
      */
-    public void removeRuntimeAttributes(final Attribute[] attrs) {
-        for (final Attribute attr : attrs) {
-            removeAttribute(attr);
-        }
+    public void removeRuntimeAttributes(final Attribute[] attributes) {
+        Streams.of(attributes).forEach(this::removeAttribute);
     }
 
     public void setArgumentName(final int i, final String name) {
@@ -1034,7 +1030,7 @@ public void setArgumentName(final int i, final String name) {
     }
 
     public void setArgumentNames(final String[] argNames) {
-        this.argNames = argNames;
+        this.argNames = ArrayUtils.nullToEmpty(argNames);
     }
 
     public void setArgumentType(final int i, final Type type) {
@@ -1042,7 +1038,7 @@ public void setArgumentType(final int i, final Type type) {
     }
 
     public void setArgumentTypes(final Type[] argTypes) {
-        this.argTypes = argTypes;
+        this.argTypes = argTypes != null ? argTypes : Type.NO_ARGS;
     }
 
     public void setClassName(final String className) { // TODO could be package-protected?
@@ -1059,10 +1055,8 @@ public void setInstructionList(final InstructionList il) { // TODO could be pack
     public void setMaxLocals() { // TODO could be package-protected? (some tests would need repackaging)
         if (il != null) {
             int max = isStatic() ? 0 : 1;
-            if (argTypes != null) {
-                for (final Type argType : argTypes) {
-                    max += argType.getSize();
-                }
+            for (final Type argType : argTypes) {
+                max += argType.getSize();
             }
             for (InstructionHandle ih = il.getStart(); ih != null; ih = ih.getNext()) {
                 final Instruction ins = ih.getInstruction();
diff --git a/src/main/java/org/apache/bcel/generic/Select.java b/src/main/java/org/apache/bcel/generic/Select.java
index ce1efc3b48..b08e5596b1 100644
--- a/src/main/java/org/apache/bcel/generic/Select.java
+++ b/src/main/java/org/apache/bcel/generic/Select.java
@@ -83,7 +83,7 @@ public abstract class Select extends BranchInstruction implements VariableLength
      * @param defaultTarget default instruction target
      */
     Select(final short opcode, final int[] match, final InstructionHandle[] targets, final InstructionHandle defaultTarget) {
-        // don't set default target before instuction is built
+        // don't set default target before instruction is built
         super(opcode, null);
         this.match = match;
         this.targets = targets;
diff --git a/src/main/java/org/apache/bcel/util/Class2HTML.java b/src/main/java/org/apache/bcel/util/Class2HTML.java
index 13952db0a4..603b05fb91 100644
--- a/src/main/java/org/apache/bcel/util/Class2HTML.java
+++ b/src/main/java/org/apache/bcel/util/Class2HTML.java
@@ -85,7 +85,7 @@ public static void main(final String[] argv) throws IOException {
                 if (argv[i].equals("-d")) { // Specify target directory, default '.'
                     dir = argv[++i];
                     if (!dir.endsWith("" + sep)) {
-                        dir = dir + sep;
+                        dir += sep;
                     }
                     final File store = new File(dir);
                     if (!store.isDirectory()) {
diff --git a/src/main/java/org/apache/bcel/util/InstructionFinder.java b/src/main/java/org/apache/bcel/util/InstructionFinder.java
index 62169817ee..e501635110 100644
--- a/src/main/java/org/apache/bcel/util/InstructionFinder.java
+++ b/src/main/java/org/apache/bcel/util/InstructionFinder.java
@@ -65,7 +65,6 @@ public class InstructionFinder {
     /**
      * Code patterns found may be checked using an additional user-defined constraint object whether they really match the
      * needed criterion. I.e., check constraints that can not expressed with regular expressions.
-     *
      */
     public interface CodeConstraint {
 
diff --git a/src/main/java/org/apache/bcel/util/SyntheticRepository.java b/src/main/java/org/apache/bcel/util/SyntheticRepository.java
index c046cb4eb3..f1889a8139 100644
--- a/src/main/java/org/apache/bcel/util/SyntheticRepository.java
+++ b/src/main/java/org/apache/bcel/util/SyntheticRepository.java
@@ -16,8 +16,8 @@
  */
 package org.apache.bcel.util;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * This repository is used in situations where a Class is created outside the realm of a ClassLoader. Classes are loaded
@@ -32,7 +32,7 @@
  */
 public class SyntheticRepository extends MemorySensitiveClassPathRepository {
 
-    private static final Map MAP = new HashMap<>(); // CLASSPATH X REPOSITORY
+    private static final Map MAP = new ConcurrentHashMap<>(); // CLASSPATH X REPOSITORY
 
     public static SyntheticRepository getInstance() {
         return getInstance(ClassPath.SYSTEM_CLASS_PATH);
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
index 34f9f5f35f..6ea0d18d1a 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
@@ -665,7 +665,7 @@ public void visitInnerClasses(final InnerClasses innerClasses) { // vmspec2 4.7.
                     checkIndex(innerClasses, innernameIdx, CONST_Utf8);
                 }
                 int acc = ic.getInnerAccessFlags();
-                acc = acc & ~(Const.ACC_PUBLIC | Const.ACC_PRIVATE | Const.ACC_PROTECTED | Const.ACC_STATIC | Const.ACC_FINAL | Const.ACC_INTERFACE |
+                acc &= ~(Const.ACC_PUBLIC | Const.ACC_PRIVATE | Const.ACC_PROTECTED | Const.ACC_STATIC | Const.ACC_FINAL | Const.ACC_INTERFACE |
                     Const.ACC_ABSTRACT);
                 if (acc != 0) {
                     addMessage("Unknown access flag for inner class '" + tostring(ic) + "' set (InnerClasses attribute '" + tostring(innerClasses) + "').");
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
index 25def60f6e..b9a67e5cf1 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
@@ -1043,8 +1043,7 @@ public VerificationResult do_verify() {
                 try {
                     delayedPass2Checks();
                 } catch (final ClassConstraintException | ClassFormatException cce) {
-                    vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
-                    return vr;
+                    return new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
                 }
                 try {
                     pass3StaticInstructionChecks();
diff --git a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java b/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
index a894174608..d8c663b0f7 100644
--- a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
+++ b/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
@@ -59,6 +59,8 @@
 import org.apache.bcel.classfile.Node;
 import org.apache.bcel.classfile.ParameterAnnotationEntry;
 import org.apache.bcel.classfile.ParameterAnnotations;
+import org.apache.bcel.classfile.Record;
+import org.apache.bcel.classfile.RecordComponentInfo;
 import org.apache.bcel.classfile.Signature;
 import org.apache.bcel.classfile.SourceFile;
 import org.apache.bcel.classfile.StackMap;
@@ -397,6 +399,16 @@ public void visitParameterAnnotationEntry(final ParameterAnnotationEntry obj) {
         tostring = toString(obj);
     }
 
+    @Override
+    public void visitRecord(final Record obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitRecordComponent(final RecordComponentInfo obj) {
+        tostring = toString(obj);
+    }
+
     @Override
     public void visitSignature(final Signature obj) {
         tostring = toString(obj);
@@ -429,4 +441,5 @@ public void visitSynthetic(final Synthetic obj) {
     public void visitUnknown(final Unknown obj) {
         tostring = toString(obj);
     }
+
 }
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java b/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
index b847b4d498..24da459e60 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
@@ -48,17 +48,14 @@ public static void setThis(final UninitializedObjectType _this) {
     }
 
     /**
-     *
      */
     private final LocalVariables locals;
 
     /**
-     *
      */
     private final OperandStack stack;
 
     /**
-     *
      */
     public Frame(final int maxLocals, final int maxStack) {
         locals = new LocalVariables(maxLocals);
@@ -66,7 +63,6 @@ public Frame(final int maxLocals, final int maxStack) {
     }
 
     /**
-     *
      */
     public Frame(final LocalVariables locals, final OperandStack stack) {
         this.locals = locals;
@@ -74,7 +70,6 @@ public Frame(final LocalVariables locals, final OperandStack stack) {
     }
 
     /**
-     *
      */
     @Override
     protected Object clone() {
@@ -82,7 +77,6 @@ protected Object clone() {
     }
 
     /**
-     *
      */
     @Override
     public boolean equals(final Object o) {
@@ -94,21 +88,18 @@ public boolean equals(final Object o) {
     }
 
     /**
-     *
      */
     public Frame getClone() {
         return (Frame) clone();
     }
 
     /**
-     *
      */
     public LocalVariables getLocals() {
         return locals;
     }
 
     /**
-     *
      */
     public OperandStack getStack() {
         return stack;
@@ -127,10 +118,10 @@ public int hashCode() {
      */
     @Override
     public String toString() {
-        String s = "Local Variables:\n";
-        s += locals;
-        s += "OperandStack:\n";
-        s += stack;
-        return s;
+        final StringBuilder s = new StringBuilder("Local Variables:\n");
+        s.append(locals);
+        s.append("OperandStack:\n");
+        s.append(stack);
+        return s.toString();
     }
 }
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java b/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
index 9f9c887fb9..1b27bb6769 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
@@ -16,12 +16,11 @@
  */
 package org.apache.bcel.verifier.structurals;
 
-import java.util.Arrays;
-
 import org.apache.bcel.generic.ReferenceType;
 import org.apache.bcel.generic.Type;
 import org.apache.bcel.verifier.exc.AssertionViolatedException;
 import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
+import org.apache.commons.lang3.ArrayFill;
 
 /**
  * This class implements an array of local variables used for symbolic JVM simulation.
@@ -37,8 +36,7 @@ public class LocalVariables implements Cloneable {
      * @param localVariableCount local variable count.
      */
     public LocalVariables(final int localVariableCount) {
-        locals = new Type[localVariableCount];
-        Arrays.fill(locals, Type.UNKNOWN);
+        locals = ArrayFill.fill(new Type[localVariableCount], Type.UNKNOWN);
     }
 
     /**
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java b/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
index c045ac9b23..8a040783a2 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
@@ -43,7 +43,6 @@ public UninitializedObjectType(final ObjectType objectType) {
     /**
      * Returns true on equality of this and o. Equality means the ObjectType instances of "initialized" equal one another in
      * this and the o instance.
-     *
      */
     @Override
     public boolean equals(final Object o) {
diff --git a/src/site/xdoc/download_bcel.xml b/src/site/xdoc/download_bcel.xml
index 4d6c7b02a2..1aee8987df 100644
--- a/src/site/xdoc/download_bcel.xml
+++ b/src/site/xdoc/download_bcel.xml
@@ -113,32 +113,32 @@ limitations under the License.
       

-
+
- - - + + + - - - + + +
bcel-6.8.1-bin.tar.gzsha512pgpbcel-6.9.0-bin.tar.gzsha512pgp
bcel-6.8.1-bin.zipsha512pgpbcel-6.9.0-bin.zipsha512pgp
- - - + + + - - - + + +
bcel-6.8.1-src.tar.gzsha512pgpbcel-6.9.0-src.tar.gzsha512pgp
bcel-6.8.1-src.zipsha512pgpbcel-6.9.0-src.zipsha512pgp
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml index da5692d481..e1bbcee28c 100644 --- a/src/site/xdoc/index.xml +++ b/src/site/xdoc/index.xml @@ -1,87 +1,87 @@ - - - - - - Home - Commons Documentation Team - - -
-

- The Byte Code Engineering Library (Apache Commons BCEL™) is intended to give users a - convenient way to analyze, create, and manipulate (binary) - Java class files (those ending with .class). Classes are - represented by objects which contain all the symbolic information - of the given class: methods, fields and byte code instructions, in - particular. -

-

- Such objects can be read from an existing file, be transformed - by a program (e.g. a class loader at run-time) and written to a file again. - An even more interesting application is the creation of classes from scratch - at run-time. The Byte Code Engineering Library (BCEL) may be also useful - if you want to learn about the Java Virtual Machine (JVM) and the format of - Java .class files. -

-

- BCEL contains a byte code verifier named JustIce, which usually - gives you much better information about what's wrong with your - code than the standard JVM message. -

-

- BCEL is already being used successfully in several projects such - as compilers, optimizers, obsfuscators, code generators - and analysis tools. Unfortunately there hasn't been much development - going on over the past few years. Feel free to help out or you - might want to have a look into the ASM project at objectweb. -

-
-
-

- The package descriptions in the Javadoc give an overview of the available features - and various project reports are provided. -

-

- The source repository can be - browsed, or you can browse/contribute via GitHub. -

-
-
-

The latest stable release of BCEL is here, you may:

- -

- Alternatively, you can pull it from the central Maven repositories through a dependency. -

- -
-
-

- The commons developer mailing list is the main channel of communication for contributors. Please remember that the lists are shared between all commons components, so prefix your email by [bcel].

-

You can also peruse JIRA.

-

Alternatively you can go through the Needs Work tags in the TagList report.

-

If you'd like to offer up pull requests via GitHub rather than applying patches to JIRA, we have a GitHub mirror.

-
- -
+ + + + + + Home + Commons Documentation Team + + +
+

+ The Byte Code Engineering Library (Apache Commons BCEL™) is intended to give users a + convenient way to analyze, create, and manipulate (binary) + Java class files (those ending with .class). Classes are + represented by objects which contain all the symbolic information + of the given class: methods, fields and byte code instructions, in + particular. +

+

+ Such objects can be read from an existing file, be transformed + by a program (e.g. a class loader at run-time) and written to a file again. + An even more interesting application is the creation of classes from scratch + at run-time. The Byte Code Engineering Library (BCEL) may be also useful + if you want to learn about the Java Virtual Machine (JVM) and the format of + Java .class files. +

+

+ BCEL contains a byte code verifier named JustIce, which usually + gives you much better information about what's wrong with your + code than the standard JVM message. +

+

+ BCEL is already being used successfully in several projects such + as compilers, optimizers, obsfuscators, code generators + and analysis tools. Unfortunately there hasn't been much development + going on over the past few years. Feel free to help out or you + might want to have a look into the ASM project at objectweb. +

+
+
+

+ The package descriptions in the Javadoc give an overview of the available features + and various project reports are provided. +

+

+ The source repository can be + browsed, or you can browse/contribute via GitHub. +

+
+
+

The latest stable release of BCEL is here, you may:

+ +

+ Alternatively, you can pull it from the central Maven repositories through a dependency. +

+ +
+
+

+ The commons developer mailing list is the main channel of communication for contributors. Please remember that the lists are shared between all commons components, so prefix your email by [bcel].

+

You can also peruse JIRA.

+

Alternatively you can go through the Needs Work tags in the TagList report.

+

If you'd like to offer up pull requests via GitHub rather than applying patches to JIRA, we have a GitHub mirror.

+
+ +
diff --git a/src/test/java/org/apache/bcel/CounterVisitorTestCase.java b/src/test/java/org/apache/bcel/CounterVisitorTestCase.java index d1fcfa5e35..6ecf3da8b9 100644 --- a/src/test/java/org/apache/bcel/CounterVisitorTestCase.java +++ b/src/test/java/org/apache/bcel/CounterVisitorTestCase.java @@ -183,6 +183,11 @@ public void testParameterAnnotationCount() { assertEquals(0, getVisitor().parameterAnnotationCount, "parameterAnnotationCount"); } + @Test + public void testRecordCount() { + assertEquals(0, getVisitor().recordCount, "recordCount"); + } + @Test public void testSignatureCount() { assertEquals(0, getVisitor().signatureAnnotationCount, "signatureAnnotationCount"); diff --git a/src/test/java/org/apache/bcel/HandleTestCase.java b/src/test/java/org/apache/bcel/HandleTestCase.java index d2fbb737a7..6646c4e0ae 100644 --- a/src/test/java/org/apache/bcel/HandleTestCase.java +++ b/src/test/java/org/apache/bcel/HandleTestCase.java @@ -1,148 +1,148 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.bcel; - -import org.apache.bcel.generic.GOTO; -import org.apache.bcel.generic.ILOAD; -import org.apache.bcel.generic.InstructionHandle; -import org.apache.bcel.generic.InstructionList; -import org.apache.bcel.generic.NOP; -import org.junit.jupiter.api.Test; - -/** - * Test for https://issues.apache.org/jira/browse/BCEL-267 "Race conditions on static fields in BranchHandle and - * InstructionHandle". - */ -public class HandleTestCase { - - static Throwable exception; - static final int MAXI = 100; - static final int MAXJ = 1000; - - /** - * Asserts that branch handles can be added an instruction list, without corrupting the list. - */ - static void branchHandles() { - for (int i = 0; i < MAXI; i++) { - final InstructionList list = new InstructionList(); - final InstructionHandle start = list.append(new NOP()); - try { - for (int j = 0; j < MAXJ; j++) { - list.append(new GOTO(start)); - } - final InstructionHandle[] instructionHandles = list.getInstructionHandles(); - for (int j = 0; j < instructionHandles.length; j++) { - final InstructionHandle handle = instructionHandles[j]; - if (j > 0) { - checkLinkage(handle, j); - if (start != ((GOTO) handle.getInstruction()).getTarget()) { - final AssertionError error = new AssertionError("unexpected instruction at index " + j); - exception = error; - throw error; - } - } - } - if (exception != null) { - return; - } - } catch (final NullPointerException e) { - System.out.println("NPE at i=" + i); - exception = e; - throw e; - } - list.dispose(); // this initializes caching of unused instruction handles - } - } - - /** - * Assert that opposite next/prev pairs always match. - */ - static void checkLinkage(final InstructionHandle ih, final int index) { - final InstructionHandle prev = ih.getPrev(); - final InstructionHandle next = ih.getNext(); - if (prev != null && prev.getNext() != ih || next != null && next.getPrev() != ih) { - final AssertionError error = new AssertionError("corrupt instruction list at index " + index); - exception = error; - throw error; - } - } - - /** - * Asserts that instruction handles can be added an instruction list, without corrupting the list. - */ - static void handles() { - for (int i = 0; i < MAXI; i++) { - final InstructionList list = new InstructionList(); - try { - for (int j = 0; j < MAXJ; j++) { - list.append(new ILOAD(j)); - } - final InstructionHandle[] instructionHandles = list.getInstructionHandles(); - for (int j = 0; j < instructionHandles.length; j++) { - final InstructionHandle handle = instructionHandles[j]; - checkLinkage(handle, j); - if (j != ((ILOAD) handle.getInstruction()).getIndex()) { - final AssertionError error = new AssertionError("unexpected instruction at index " + j); - exception = error; - throw error; - } - } - if (exception != null) { - return; - } - } catch (final NullPointerException e) { - System.out.println("NPE at i=" + i); - exception = e; - throw e; - } - list.dispose(); // this initializes caching of unused instruction handles - } - } - - /** - * Concurrently run the given runnable in two threads. - */ - private void perform(final Runnable r) throws Throwable { - exception = null; - final Thread t1 = new Thread(r); - final Thread t2 = new Thread(r); - t1.start(); - t2.start(); - t1.join(); - t2.join(); - if (exception != null) { - throw exception; - } - } - - /** - * Assert that two independent instruction lists can be modified concurrently. Here: inserting branch instructions. - */ - @Test - public void testBranchHandle() throws Throwable { - perform(HandleTestCase::branchHandles); - } - - /** - * Assert that two independent instruction lists can be modified concurrently. Here: inserting regular instructions. - */ - @Test - public void testInstructionHandle() throws Throwable { - perform(HandleTestCase::handles); - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.bcel; + +import org.apache.bcel.generic.GOTO; +import org.apache.bcel.generic.ILOAD; +import org.apache.bcel.generic.InstructionHandle; +import org.apache.bcel.generic.InstructionList; +import org.apache.bcel.generic.NOP; +import org.junit.jupiter.api.Test; + +/** + * Test for https://issues.apache.org/jira/browse/BCEL-267 "Race conditions on static fields in BranchHandle and + * InstructionHandle". + */ +public class HandleTestCase { + + static Throwable exception; + static final int MAXI = 100; + static final int MAXJ = 1000; + + /** + * Asserts that branch handles can be added an instruction list, without corrupting the list. + */ + static void branchHandles() { + for (int i = 0; i < MAXI; i++) { + final InstructionList list = new InstructionList(); + final InstructionHandle start = list.append(new NOP()); + try { + for (int j = 0; j < MAXJ; j++) { + list.append(new GOTO(start)); + } + final InstructionHandle[] instructionHandles = list.getInstructionHandles(); + for (int j = 0; j < instructionHandles.length; j++) { + final InstructionHandle handle = instructionHandles[j]; + if (j > 0) { + checkLinkage(handle, j); + if (start != ((GOTO) handle.getInstruction()).getTarget()) { + final AssertionError error = new AssertionError("unexpected instruction at index " + j); + exception = error; + throw error; + } + } + } + if (exception != null) { + return; + } + } catch (final NullPointerException e) { + System.out.println("NPE at i=" + i); + exception = e; + throw e; + } + list.dispose(); // this initializes caching of unused instruction handles + } + } + + /** + * Assert that opposite next/prev pairs always match. + */ + static void checkLinkage(final InstructionHandle ih, final int index) { + final InstructionHandle prev = ih.getPrev(); + final InstructionHandle next = ih.getNext(); + if (prev != null && prev.getNext() != ih || next != null && next.getPrev() != ih) { + final AssertionError error = new AssertionError("corrupt instruction list at index " + index); + exception = error; + throw error; + } + } + + /** + * Asserts that instruction handles can be added an instruction list, without corrupting the list. + */ + static void handles() { + for (int i = 0; i < MAXI; i++) { + final InstructionList list = new InstructionList(); + try { + for (int j = 0; j < MAXJ; j++) { + list.append(new ILOAD(j)); + } + final InstructionHandle[] instructionHandles = list.getInstructionHandles(); + for (int j = 0; j < instructionHandles.length; j++) { + final InstructionHandle handle = instructionHandles[j]; + checkLinkage(handle, j); + if (j != ((ILOAD) handle.getInstruction()).getIndex()) { + final AssertionError error = new AssertionError("unexpected instruction at index " + j); + exception = error; + throw error; + } + } + if (exception != null) { + return; + } + } catch (final NullPointerException e) { + System.out.println("NPE at i=" + i); + exception = e; + throw e; + } + list.dispose(); // this initializes caching of unused instruction handles + } + } + + /** + * Concurrently run the given runnable in two threads. + */ + private void perform(final Runnable r) throws Throwable { + exception = null; + final Thread t1 = new Thread(r); + final Thread t2 = new Thread(r); + t1.start(); + t2.start(); + t1.join(); + t2.join(); + if (exception != null) { + throw exception; + } + } + + /** + * Assert that two independent instruction lists can be modified concurrently. Here: inserting branch instructions. + */ + @Test + public void testBranchHandle() throws Throwable { + perform(HandleTestCase::branchHandles); + } + + /** + * Assert that two independent instruction lists can be modified concurrently. Here: inserting regular instructions. + */ + @Test + public void testInstructionHandle() throws Throwable { + perform(HandleTestCase::handles); + } +} diff --git a/src/test/java/org/apache/bcel/classfile/ConstantPoolModuleToStringTestCase.java b/src/test/java/org/apache/bcel/classfile/ConstantPoolModuleToStringTestCase.java index e7f08c96eb..b63564b58e 100644 --- a/src/test/java/org/apache/bcel/classfile/ConstantPoolModuleToStringTestCase.java +++ b/src/test/java/org/apache/bcel/classfile/ConstantPoolModuleToStringTestCase.java @@ -506,7 +506,8 @@ public void test(final String first) throws Exception { @ValueSource(strings = { // @formatter:off "java.lang.CharSequence$1CharIterator", // contains attribute EnclosingMethod - "org.apache.commons.lang3.function.TriFunction", // contains attributes BootstrapMethods, InnerClasses, LineNumberTable, LocalVariableTable, LocalVariableTypeTable, RuntimeVisibleAnnotations, Signature, SourceFile + "org.apache.commons.lang3.function.TriFunction", // contains attributes BootstrapMethods, InnerClasses, LineNumberTable, LocalVariableTable, + // LocalVariableTypeTable, RuntimeVisibleAnnotations, Signature, SourceFile "org.apache.commons.lang3.math.NumberUtils", // contains attribute ConstantFloat, ConstantDouble "org.apache.bcel.Const", // contains attributes MethodParameters "java.io.StringBufferInputStream", // contains attributes Deprecated, StackMap diff --git a/src/test/java/org/apache/bcel/classfile/RecordTestCase.java b/src/test/java/org/apache/bcel/classfile/RecordTestCase.java new file mode 100644 index 0000000000..8056250a7d --- /dev/null +++ b/src/test/java/org/apache/bcel/classfile/RecordTestCase.java @@ -0,0 +1,121 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.bcel.classfile; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; + +import org.apache.bcel.AbstractTestCase; +import org.apache.bcel.util.SyntheticRepository; +import org.apache.bcel.visitors.CountingVisitor; +import org.junit.jupiter.api.Test; + +public class RecordTestCase extends AbstractTestCase { + + /** + * Check that we can copy a attribute correctly. + */ + @Test + public void recordsCanBeCopied() throws ClassNotFoundException, IOException { + final JavaClass clazz = new ClassParser("src/test/resources/record/SimpleRecord.class").parse(); + final JavaClass copyClazz = clazz.copy(); + assertEquals(clazz.toString(), copyClazz.toString(), "both records should have the same value"); + } + + /** + * Check that a record can be visited by our visitors + */ + @Test + public void recordsCanBeVisited() throws ClassNotFoundException, IOException { + final JavaClass clazz = new ClassParser("src/test/resources/record/SimpleRecord.class").parse(); + final CountingVisitor countVisitor = new CountingVisitor(); + final DescendingVisitor desendingVisitor = new DescendingVisitor(clazz, countVisitor); + desendingVisitor.visit(); + assertEquals(1,countVisitor.recordCount, "should count one record"); + assertEquals(2,countVisitor.recordComponentCount, "should count two record components"); + } + + + /** + * Check that we can save and load the attribute correctly. + */ + @Test + public void testAttributeSerializtion() throws ClassNotFoundException, IOException { + final JavaClass clazz = new ClassParser("src/test/resources/record/SimpleRecord.class").parse(); + final File tfile = createTestdataFile("SimpleRecord.class"); + final Record recordAttribute = (Record)findAttribute("Record",clazz)[0]; + clazz.dump(tfile); + // Read in the new version and check it is OK + final SyntheticRepository repos2 = createRepos("."); + final JavaClass clazzFromRepo = repos2.loadClass("SimpleRecord"); + assertNotNull(clazzFromRepo); // Use the variable to avoid a warning + final Record recordAttributeFromRepo = (Record)findAttribute("Record",clazzFromRepo)[0]; + assertEquals(recordAttribute.toString(), recordAttributeFromRepo.toString(), "Both attributes needs to be equal"); + tfile.deleteOnExit(); + } + + /** + * A record type, once compiled, should result in a class file that is + * marked such that we can determine from the access flags + * (through BCEL) that it is in fact a record. + * + * @throws IOException + * @throws ClassFormatException + */ + @Test + public void testRecordClassSaysItIs() throws ClassNotFoundException, ClassFormatException, IOException { + final JavaClass clazz = new ClassParser("src/test/resources/record/SimpleRecord.class").parse(); + assertTrue(clazz.isRecord(), "Expected SimpleRecord class to say it was a record - but it didn't !"); + final JavaClass simpleClazz = getTestJavaClass(PACKAGE_BASE_NAME + ".data.SimpleClass"); + assertFalse(simpleClazz.isRecord(), "Expected SimpleClass class to say it was not a record - but it didn't !"); + } + + /** + * A simple record with two simple fields, an integer and a String field, should + * show its content in its string representation. + * + * @throws ClassNotFoundException + * @throws ClassFormatException + * @throws IOException + */ + @Test + public void testRecordToString() throws ClassNotFoundException, ClassFormatException, IOException { + final JavaClass clazz = new ClassParser("src/test/resources/record/SimpleRecord.class").parse(); + final Attribute[] attributes = clazz.getAttributes(); + final Record recordAttribute = (Record) findAttribute("Record",clazz)[0]; + assertEquals(4, attributes.length); + assertEquals("SourceFile: SimpleRecord.java", attributes[0].toString()); + assertEquals("Record(2):\n" + + " RecordComponentInfo(aNumber,I,0):\n" + + " RecordComponentInfo(aString,Ljava/lang/String;,1):\n" + + " RuntimeVisibleAnnotations:\n" + + " @Ljavax/annotation/Nonnull;" + ,recordAttribute.toString()); + final RecordComponentInfo firstComponent = recordAttribute.getComponents()[0]; + assertEquals(5, firstComponent.getIndex()); + assertEquals(6, firstComponent.getDescriptorIndex()); + assertEquals(0, firstComponent.getAttributes().length); + assertEquals(recordAttribute.getConstantPool(),firstComponent.getConstantPool()); + assertEquals("RecordComponentInfo(aNumber,I,0):", firstComponent.toString()); + } + +} diff --git a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java b/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java index 8c3144b66e..7d6095d0c2 100644 --- a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java +++ b/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java @@ -20,6 +20,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Arrays; @@ -59,7 +60,10 @@ final class CodeToString { final String code = method.getCode().toString(false); assertTrue(code.contains("0: aload_0"), code); assertTrue(code.contains("1: aload_1"), code); - assertTrue(code.contains("2: putfield\t\torg.apache.bcel.classfile.UtilityTestCase$1CodeToString.this$0 Lorg/apache/bcel/classfile/UtilityTestCase;"), code); + assertTrue( + code.contains( + "2: putfield\t\torg.apache.bcel.classfile.UtilityTestCase$1CodeToString.this$0 Lorg/apache/bcel/classfile/UtilityTestCase;"), + code); assertTrue(code.contains("5: aload_0"), code); assertTrue(code.contains("6: invokespecial\tjava.lang.Object. ()V"), code); assertTrue(code.contains("9: aload_0"), code); @@ -105,14 +109,14 @@ public void testIsSet() { @Test public void testPrintArray() { - assertEquals(null, Utility.printArray(null, false, false)); + assertNull(Utility.printArray(null, false, false)); assertEquals("", Utility.printArray(new Object[0], false, false)); assertEquals("{}", Utility.printArray(new Object[0], true, false)); - assertEquals("null", Utility.printArray(new Object[]{null}, false, false)); - assertEquals("a, b", Utility.printArray(new String[]{"a", "b"}, false, false)); - assertEquals("{a, b}", Utility.printArray(new String[]{"a", "b"}, true, false)); - assertEquals("\"a\", \"b\"", Utility.printArray(new String[]{"a", "b"}, false, true)); - assertEquals("{\"a\", \"b\"}", Utility.printArray(new String[]{"a", "b"}, true, true)); + assertEquals("null", Utility.printArray(new Object[] { null }, false, false)); + assertEquals("a, b", Utility.printArray(new String[] { "a", "b" }, false, false)); + assertEquals("{a, b}", Utility.printArray(new String[] { "a", "b" }, true, false)); + assertEquals("\"a\", \"b\"", Utility.printArray(new String[] { "a", "b" }, false, true)); + assertEquals("{\"a\", \"b\"}", Utility.printArray(new String[] { "a", "b" }, true, true)); } @Test @@ -141,35 +145,35 @@ public void testSignatureToStringWithGenerics() throws Exception { // tests for BCEL-197 assertEquals("java.util.Map>", Utility.signatureToString("Ljava/util/Map;>;"), "generic signature"); assertEquals("java.util.Set", Utility.signatureToString("Ljava/util/Set<+Ljava/nio/file/OpenOption;>;"), - "generic signature"); + "generic signature"); assertEquals("java.nio.file.attribute.FileAttribute[]", Utility.signatureToString("[Ljava/nio/file/attribute/FileAttribute<*>;"), - "generic signature"); + "generic signature"); // tests for BCEL-286 assertEquals( - "boofcv.alg.tracker.tld.TldTracker, boofcv.struct.image.GrayI>", + "boofcv.alg.tracker.tld.TldTracker, boofcv.struct.image.GrayI>", Utility.signatureToString( - "Lboofcv/alg/tracker/tld/TldTracker;Lboofcv/struct/image/GrayI;>;"), - "generic signature"); + "Lboofcv/alg/tracker/tld/TldTracker;Lboofcv/struct/image/GrayI;>;"), + "generic signature"); assertEquals("java.util.Map", Utility.signatureToString("Ljava/util/Map<**>;"), "generic signature"); assertEquals("com.jme3.util.IntMap.IntMapIterator", Utility.signatureToString("Lcom/jme3/util/IntMap.IntMapIterator;"), "generic signature"); // tests for BCEL-279 assertEquals("(com.google.common.io.ByteProcessor, int)T", - Utility.signatureToString("(Lcom/google/common/io/ByteProcessor;I)TT;", false), "type parameters signature"); + Utility.signatureToString("(Lcom/google/common/io/ByteProcessor;I)TT;", false), "type parameters signature"); assertEquals("(com.google.common.io.ByteProcessor, int)T", - Utility.signatureToString("(Lcom/google/common/io/ByteProcessor;I)TT;", true), "type parameters signature"); + Utility.signatureToString("(Lcom/google/common/io/ByteProcessor;I)TT;", true), "type parameters signature"); assertEquals("(M)void", - Utility.signatureToString("(TM;)V"), "type parameters signature"); + Utility.signatureToString("(TM;)V"), "type parameters signature"); assertEquals("()com.google.common.cache.Weigher", - Utility.signatureToString("()Lcom/google/common/cache/Weigher;"), "type parameters signature"); + Utility.signatureToString("()Lcom/google/common/cache/Weigher;"), "type parameters signature"); assertEquals("(com.google.common.cache.Weigher)com.google.common.cache.CacheBuilder", - Utility.signatureToString("(Lcom/google/common/cache/Weigher<-TK1;-TV1;>;)Lcom/google/common/cache/CacheBuilder;"), - "type parameters signature"); + Utility.signatureToString("(Lcom/google/common/cache/Weigher<-TK1;-TV1;>;)Lcom/google/common/cache/CacheBuilder;"), + "type parameters signature"); assertEquals(" extends java.lang.Object implements com.google.common.graph.Network", - Utility.signatureToString("Ljava/lang/Object;Lcom/google/common/graph/Network;", false), - "class signature"); + Utility.signatureToString("Ljava/lang/Object;Lcom/google/common/graph/Network;", false), + "class signature"); assertEquals(" extends Object", - Utility.signatureToString("Ljava/lang/Object;"), "class signature"); + Utility.signatureToString("Ljava/lang/Object;"), "class signature"); } } diff --git a/src/test/java/org/apache/bcel/data/PLSETestClass2.java b/src/test/java/org/apache/bcel/data/PLSETestClass2.java index d54b9a55a9..b771e2015a 100644 --- a/src/test/java/org/apache/bcel/data/PLSETestClass2.java +++ b/src/test/java/org/apache/bcel/data/PLSETestClass2.java @@ -1,29 +1,29 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.bcel.data; - -public class PLSETestClass2 { - public static void main(final String[] args) { - @SuppressWarnings("unused") - int t = 0; - - for (int i = 0; i < 100; i++) { - t += i; - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.bcel.data; + +public class PLSETestClass2 { + public static void main(final String[] args) { + @SuppressWarnings("unused") + int t = 0; + + for (int i = 0; i < 100; i++) { + t += i; + } + } +} diff --git a/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java b/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java index cdbb808bb5..15647fcf66 100644 --- a/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java +++ b/src/test/java/org/apache/bcel/generic/EmptyVisitorTestCase.java @@ -38,9 +38,19 @@ final class EmptyVisitorTestCase { @ParameterizedTest @ValueSource(strings = { // @formatter:off - "java.math.BigInteger", // contains instructions [AALOAD, AASTORE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CHECKCAST, D2I, DADD, DALOAD, DASTORE, DCONST, DDIV, DMUL, DRETURN, DSUB, DUP, DUP2, DUP_X2, FCONST, FRETURN, GETFIELD, GETSTATIC, GOTO, I2B, I2D, I2L, IADD, IALOAD, IAND, IASTORE, ICONST, IDIV, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST, LDC, LDC2_W, LDC_W, LDIV, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, NEW, NEWARRAY, POP, PUTFIELD, PUTSTATIC, RETURN, SIPUSH] - "java.math.BigDecimal", // contains instructions [CASTORE, D2L, DLOAD, FALOAD, FASTORE, FDIV, FMUL, I2S, IF_ACMPEQ, LXOR, MONITORENTER, MONITOREXIT, TABLESWITCH] - "java.awt.Color", // contains instructions [D2F, DCMPG, DCMPL, F2D, F2I, FADD, FCMPG, FCMPL, FLOAD, FSTORE, FSUB, I2F, INVOKEDYNAMIC] + "java.math.BigInteger", // contains instructions [AALOAD, AASTORE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, + // ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CHECKCAST, D2I, DADD, DALOAD, DASTORE, DCONST + // DDIV, DMUL, DRETURN, DSUB, DUP, DUP2, DUP_X2, FCONST, FRETURN, GETFIELD, GETSTATIC, GOTO, I2B, + // I2D, I2L, IADD, IALOAD, IAND, IASTORE, ICONST, IDIV, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, + // IFNONNULL, IFNULL, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, + // IINC, ILOAD, IMUL, INEG, INSTANCEOF, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, + // IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, + // LCONST, LDC, LDC2_W, LDC_W, LDIV, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, + // LSTORE, LSUB, LUSHR, NEW, NEWARRAY, POP, PUTFIELD, PUTSTATIC, RETURN, SIPUSH] + "java.math.BigDecimal", // contains instructions [CASTORE, D2L, DLOAD, FALOAD, FASTORE, FDIV, FMUL, I2S, IF_ACMPEQ, LXOR, + // MONITORENTER, MONITOREXIT, TABLESWITCH] + "java.awt.Color", // contains instructions [D2F, DCMPG, DCMPL, F2D, F2I, FADD, FCMPG, FCMPL, FLOAD, FSTORE, FSUB, I2F, + // INVOKEDYNAMIC] "java.util.Map", // contains instruction INVOKEINTERFACE "java.io.Bits", // contains instruction I2C "java.io.BufferedInputStream", // contains instruction DUP_X1 diff --git a/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java b/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java index 762f6fdbb2..056453c1b0 100644 --- a/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java +++ b/src/test/java/org/apache/bcel/generic/GeneratingAnnotatedClassesTestCase.java @@ -291,8 +291,7 @@ public AnnotationEntryGen createSimpleInvisibleAnnotation(final ConstantPoolGen final ObjectType t = new ObjectType("SimpleAnnotation"); final List elements = new ArrayList<>(); elements.add(nvGen); - final AnnotationEntryGen a = new AnnotationEntryGen(t, elements, false, cp); - return a; + return new AnnotationEntryGen(t, elements, false, cp); } public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp) { @@ -301,8 +300,7 @@ public AnnotationEntryGen createSimpleVisibleAnnotation(final ConstantPoolGen cp final ObjectType t = new ObjectType("SimpleAnnotation"); final List elements = new ArrayList<>(); elements.add(nvGen); - final AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp); - return a; + return new AnnotationEntryGen(t, elements, true, cp); } private void dumpClass(final ClassGen cg, final String fname) { diff --git a/src/test/java/org/apache/bcel/generic/InstructionFactoryTestCase.java b/src/test/java/org/apache/bcel/generic/InstructionFactoryTestCase.java index 84782d6743..6b07992dcb 100644 --- a/src/test/java/org/apache/bcel/generic/InstructionFactoryTestCase.java +++ b/src/test/java/org/apache/bcel/generic/InstructionFactoryTestCase.java @@ -62,6 +62,12 @@ public void testArrayStore() throws Exception { assertEquals(InstructionConst.AASTORE, createArrayStore(Type.getType("[I"))); } + @Test + public void testCreateInvokeNullArgTypes() throws Exception { + final InstructionFactory factory = new InstructionFactory(new ClassGen(Repository.lookupClass(Object.class))); + factory.createInvoke("", "", Type.VOID, null, Const.INVOKESPECIAL, false); // Mustn't throw an NPE + } + @Test public void testExceptions() throws Exception { final InstructionFactory factory = new InstructionFactory(new ClassGen(Repository.lookupClass(Object.class))); diff --git a/src/test/java/org/apache/bcel/generic/TypeTestCase.java b/src/test/java/org/apache/bcel/generic/TypeTestCase.java index 303a75ba4c..043ed2d692 100644 --- a/src/test/java/org/apache/bcel/generic/TypeTestCase.java +++ b/src/test/java/org/apache/bcel/generic/TypeTestCase.java @@ -18,6 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import org.apache.bcel.Repository; import org.apache.bcel.classfile.Code; @@ -41,7 +42,7 @@ public void testBCEL243() { @Test public void testInternalTypeNametoSignature() { - assertEquals(null, Type.internalTypeNameToSignature(null)); + assertNull(Type.internalTypeNameToSignature(null)); assertEquals("", Type.internalTypeNameToSignature("")); assertEquals("TT;", Type.internalTypeNameToSignature("TT;")); assertEquals("Ljava/lang/String;", Type.internalTypeNameToSignature("Ljava/lang/String;")); diff --git a/src/test/java/org/apache/bcel/util/BCELifierTestCase.java b/src/test/java/org/apache/bcel/util/BCELifierTestCase.java index 8ab68d6c6d..9e66445464 100644 --- a/src/test/java/org/apache/bcel/util/BCELifierTestCase.java +++ b/src/test/java/org/apache/bcel/util/BCELifierTestCase.java @@ -48,8 +48,7 @@ public class BCELifierTestCase extends AbstractTestCase { private String canonHashRef(String input) { input = input.replaceAll("#\\d+", "#n"); // numbers may vary in length input = input.replaceAll(" +", " "); // collapse spaces - input = input.replaceAll("//.+", ""); // comments may vary - return input; + return input.replaceAll("//.+", ""); } private String exec(final File workDir, final String... args) throws Exception { diff --git a/src/test/java/org/apache/bcel/util/ClassPathTestCase.java b/src/test/java/org/apache/bcel/util/ClassPathTestCase.java index 5a05bbc442..1ce94bdd9a 100644 --- a/src/test/java/org/apache/bcel/util/ClassPathTestCase.java +++ b/src/test/java/org/apache/bcel/util/ClassPathTestCase.java @@ -1,46 +1,46 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.bcel.util; - -import static org.junit.jupiter.api.Assertions.assertNotNull; - -import java.io.IOException; -import java.io.InputStream; - -import org.apache.bcel.AbstractTestCase; -import org.junit.jupiter.api.Test; - -public class ClassPathTestCase extends AbstractTestCase { - - @Test - public void testGetClassFile() throws IOException { - assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getClassFile("java.lang.String")); - } - - @Test - public void testGetResource() { - assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getResource("java/lang/String.class")); - } - - @Test - public void testGetResourceAsStream() throws IOException { - try (final InputStream inputStream = ClassPath.SYSTEM_CLASS_PATH.getResourceAsStream("java/lang/String.class")) { - assertNotNull(inputStream); - } - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.bcel.util; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.io.IOException; +import java.io.InputStream; + +import org.apache.bcel.AbstractTestCase; +import org.junit.jupiter.api.Test; + +public class ClassPathTestCase extends AbstractTestCase { + + @Test + public void testGetClassFile() throws IOException { + assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getClassFile("java.lang.String")); + } + + @Test + public void testGetResource() { + assertNotNull(ClassPath.SYSTEM_CLASS_PATH.getResource("java/lang/String.class")); + } + + @Test + public void testGetResourceAsStream() throws IOException { + try (final InputStream inputStream = ClassPath.SYSTEM_CLASS_PATH.getResourceAsStream("java/lang/String.class")) { + assertNotNull(inputStream); + } + } +} diff --git a/src/test/java/org/apache/bcel/util/ModularRuntimeImageTestCase.java b/src/test/java/org/apache/bcel/util/ModularRuntimeImageTestCase.java index 3c986974cb..561bdb4ca8 100644 --- a/src/test/java/org/apache/bcel/util/ModularRuntimeImageTestCase.java +++ b/src/test/java/org/apache/bcel/util/ModularRuntimeImageTestCase.java @@ -1,75 +1,75 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.bcel.util; - -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assumptions.assumeTrue; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.List; - -import org.apache.commons.lang3.JavaVersion; -import org.apache.commons.lang3.SystemUtils; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -/** - * Tests {@link ModularRuntimeImage}. - */ -public class ModularRuntimeImageTestCase { - - @BeforeAll - public static void before() { - assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)); - } - - @ParameterizedTest - @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") - public void testListJreModule(final ModularRuntimeImage modularRuntimeImage) throws IOException { - final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH + "/java.base"); - assertFalse(listEntries.isEmpty()); - assertTrue(listEntries.toString().indexOf("/java.base") > -1); - } - - @ParameterizedTest - @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") - public void testListJreModulePackageDir(final ModularRuntimeImage modularRuntimeImage) throws IOException { - final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH + "/java.base/java/lang"); - assertFalse(listEntries.isEmpty()); - assertTrue(listEntries.toString().indexOf("/java.base/java/lang/String.class") > -1); - } - - @ParameterizedTest - @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") - public void testListJreModules(final ModularRuntimeImage modularRuntimeImage) throws IOException { - final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH); - assertFalse(listEntries.isEmpty()); - assertTrue(listEntries.toString().indexOf("/java.base") > -1); - } - - @ParameterizedTest - @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") - public void testListJrePackages(final ModularRuntimeImage modularRuntimeImage) throws IOException { - final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.PACKAGES_PATH); - assertFalse(listEntries.isEmpty()); - assertTrue(listEntries.toString().indexOf("java.lang") > -1); - } -} +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.bcel.util; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +import org.apache.commons.lang3.JavaVersion; +import org.apache.commons.lang3.SystemUtils; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +/** + * Tests {@link ModularRuntimeImage}. + */ +public class ModularRuntimeImageTestCase { + + @BeforeAll + public static void before() { + assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)); + } + + @ParameterizedTest + @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") + public void testListJreModule(final ModularRuntimeImage modularRuntimeImage) throws IOException { + final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH + "/java.base"); + assertFalse(listEntries.isEmpty()); + assertTrue(listEntries.toString().indexOf("/java.base") > -1); + } + + @ParameterizedTest + @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") + public void testListJreModulePackageDir(final ModularRuntimeImage modularRuntimeImage) throws IOException { + final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH + "/java.base/java/lang"); + assertFalse(listEntries.isEmpty()); + assertTrue(listEntries.toString().indexOf("/java.base/java/lang/String.class") > -1); + } + + @ParameterizedTest + @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") + public void testListJreModules(final ModularRuntimeImage modularRuntimeImage) throws IOException { + final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.MODULES_PATH); + assertFalse(listEntries.isEmpty()); + assertTrue(listEntries.toString().indexOf("/java.base") > -1); + } + + @ParameterizedTest + @MethodSource("org.apache.bcel.generic.JavaHome#streamModularRuntimeImage") + public void testListJrePackages(final ModularRuntimeImage modularRuntimeImage) throws IOException { + final List listEntries = modularRuntimeImage.list(ModularRuntimeImage.PACKAGES_PATH); + assertFalse(listEntries.isEmpty()); + assertTrue(listEntries.toString().indexOf("java.lang") > -1); + } +} diff --git a/src/test/java/org/apache/bcel/verifier/JiraBcel369TestCase.java b/src/test/java/org/apache/bcel/verifier/JiraBcel369TestCase.java index 5a8502d173..489481994c 100644 --- a/src/test/java/org/apache/bcel/verifier/JiraBcel369TestCase.java +++ b/src/test/java/org/apache/bcel/verifier/JiraBcel369TestCase.java @@ -34,7 +34,9 @@ public void testCompileAndVerify() throws ClassNotFoundException { /** * 3.7.0 fails with *
{@code
-     * org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL ERROR: Some RuntimeException occurred while verify()ing class 'issue369.Test', method 'public void (int arg1)'. Original RuntimeException's stack trace:
+     * org.apache.bcel.verifier.exc.AssertionViolatedException:
+     * INTERNAL ERROR: Some RuntimeException occurred while verify()ing class 'issue369.Test', method 'public void (int arg1)'.
+     * Original RuntimeException's stack trace:
 ---
 org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL ERROR: outFrame not set! This:
   24: return    [InstructionContext]
diff --git a/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java
index 951c0c8a47..314fb6b6d6 100644
--- a/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java
+++ b/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java
@@ -133,7 +133,7 @@ public void testDefinitionImpl() throws ClassNotFoundException {
 
     @Test
     public void testJvmOpCodes() throws ClassNotFoundException {
-    	testDefaultMethodValidation("org.apache.bcel.verifier.tests.JvmOpCodes");
+        testDefaultMethodValidation("org.apache.bcel.verifier.tests.JvmOpCodes");
     }
 
     @Test
@@ -160,6 +160,6 @@ public void testPackagePrivateStaticField() throws ClassNotFoundException {
 
     @Test
     public void testWSDL() throws IOException, URISyntaxException, ClassNotFoundException {
-        testJarFile(getJarFile(javax.wsdl.Port.class), "WSDLReaderImpl",  "DefinitionImpl");
+        testJarFile(getJarFile(javax.wsdl.Port.class), "WSDLReaderImpl", "DefinitionImpl");
     }
 }
diff --git a/src/test/java/org/apache/bcel/verifier/tests/JvmOpCodes.java b/src/test/java/org/apache/bcel/verifier/tests/JvmOpCodes.java
index b9b94e2ffc..1a6b99fc7c 100644
--- a/src/test/java/org/apache/bcel/verifier/tests/JvmOpCodes.java
+++ b/src/test/java/org/apache/bcel/verifier/tests/JvmOpCodes.java
@@ -41,7 +41,8 @@
  */
 public class JvmOpCodes {
 
-    long l1, l2;
+    long l1;
+    long l2;
 
     /**
      * Tests {@link DNEG}.
@@ -61,7 +62,7 @@ public class JvmOpCodes {
      * Tests {@link DUP2}.
      */
     long dup2(long a) {
-        return a = a + 1;
+        return a++;
     }
 
     /**
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestReturn03Creator.java b/src/test/java/org/apache/bcel/verifier/tests/TestReturn03Creator.java
index 097f859eb5..878709d3b8 100644
--- a/src/test/java/org/apache/bcel/verifier/tests/TestReturn03Creator.java
+++ b/src/test/java/org/apache/bcel/verifier/tests/TestReturn03Creator.java
@@ -39,7 +39,8 @@ public abstract class TestReturn03Creator extends TestCreator {
     private final String genClassSuffix;
 
     protected TestReturn03Creator(final Type returnType, final String genClassSuffix) {
-        classGen = new ClassGen(TEST_PACKAGE + ".TestReturn03" + genClassSuffix, "java.lang.Object", "TestReturn03.java", Const.ACC_PUBLIC | Const.ACC_SUPER, new String[] {});
+        classGen = new ClassGen(TEST_PACKAGE + ".TestReturn03" + genClassSuffix, "java.lang.Object", "TestReturn03.java", Const.ACC_PUBLIC | Const.ACC_SUPER,
+                new String[] {});
 
         constantPoolGen = classGen.getConstantPool();
         instructionFactory = new InstructionFactory(classGen, constantPoolGen);
@@ -56,7 +57,8 @@ public void create(final OutputStream out) throws IOException {
 
     private void createMethod_0() {
         final InstructionList il = new InstructionList();
-        final MethodGen method = new MethodGen(Const.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {}, "", TEST_PACKAGE + ".TestReturn03", il, constantPoolGen);
+        final MethodGen method = new MethodGen(Const.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {}, "", TEST_PACKAGE + ".TestReturn03", il,
+                constantPoolGen);
 
         final InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
         assertNotNull(ih_0); // TODO why is this not used
@@ -72,7 +74,7 @@ private void createMethod_0() {
     private void createMethod_1() {
         final InstructionList il = new InstructionList();
         final MethodGen method = new MethodGen(Const.ACC_PUBLIC | Const.ACC_STATIC, Type.INT, Type.NO_ARGS, new String[] {}, "test3",
-            TEST_PACKAGE + ".TestReturn03" + genClassSuffix, il, constantPoolGen);
+                TEST_PACKAGE + ".TestReturn03" + genClassSuffix, il, constantPoolGen);
 
         final InstructionHandle ih_0 = il.append(InstructionConst.ACONST_NULL);
         assertNotNull(ih_0); // TODO why is this not used
diff --git a/src/test/java/org/apache/bcel/visitors/CountingVisitor.java b/src/test/java/org/apache/bcel/visitors/CountingVisitor.java
index 3522df260f..1b95a9f926 100644
--- a/src/test/java/org/apache/bcel/visitors/CountingVisitor.java
+++ b/src/test/java/org/apache/bcel/visitors/CountingVisitor.java
@@ -68,6 +68,8 @@
 import org.apache.bcel.classfile.NestMembers;
 import org.apache.bcel.classfile.ParameterAnnotationEntry;
 import org.apache.bcel.classfile.ParameterAnnotations;
+import org.apache.bcel.classfile.Record;
+import org.apache.bcel.classfile.RecordComponentInfo;
 import org.apache.bcel.classfile.Signature;
 import org.apache.bcel.classfile.SourceFile;
 import org.apache.bcel.classfile.StackMap;
@@ -204,6 +206,13 @@ public class CountingVisitor implements Visitor {
 
     /** @since 6.4.0 */
     public int nestMembersCount;
+
+    /** @since 6.9.0 */
+    public int recordCount;
+
+    /** @since 6.9.0 */
+    public int recordComponentCount;
+
     // CHECKSTYLE:ON
 
     @Override
@@ -480,6 +489,16 @@ public void visitParameterAnnotationEntry(final ParameterAnnotationEntry paramet
         // TODO Auto-generated method stub
     }
 
+    @Override
+    public void visitRecord(final Record v) {
+        recordCount++;
+    }
+
+    @Override
+    public void visitRecordComponent(final RecordComponentInfo v) {
+        recordComponentCount++;
+    }
+
     @Override
     public void visitSignature(final Signature obj) {
         signatureAnnotationCount++;
diff --git a/src/test/resources/StackMapExample2.java b/src/test/resources/StackMapExample2.java
index 441f678e4b..24598d3cee 100644
--- a/src/test/resources/StackMapExample2.java
+++ b/src/test/resources/StackMapExample2.java
@@ -1,12 +1,12 @@
-/*
- * Another version of StackMapExample using 2 types of locals String and int
- * instead of just String. 
- */
-public class StackMapExample2 {
-
-    public static void main(String[] args) {
-        if (args.length == 1 && "Hello".equals(args[0])) {
-            System.out.println("Hello World");
-        }
-    }
-}
+/*
+ * Another version of StackMapExample using 2 types of locals String and int
+ * instead of just String. 
+ */
+public class StackMapExample2 {
+
+    public static void main(String[] args) {
+        if (args.length == 1 && "Hello".equals(args[0])) {
+            System.out.println("Hello World");
+        }
+    }
+}
diff --git a/src/test/resources/record/SimpleRecord.class b/src/test/resources/record/SimpleRecord.class
new file mode 100644
index 0000000000000000000000000000000000000000..bf6b81196e5121e296b4e17c517f70235719c1f9
GIT binary patch
literal 1506
zcmaJ>TT|0O6#ll9rY(`uT2L+m0+qBN@qR1fD2^jD1s!1epikR&hX&GYO;SexlMgZ@
z;|ve}0DqL@*(N|}k%!$qdvd<>o!jQm-;>_}UgDL87=ylJwc57W7Io=1G{hN3_W2<<
zZSL%uftEqzTb))-xD0GV-FAG}a`qT?ByYPNXoIMV07B^{4p
zq6_$H@-wBmB^{?@+XPIkT8`zfF^m}-{f>)OhPjKbKXRA1gfH9+9PxG85NQlxM8^=a
z3J8oUPvs87m(E_Zf-cu3YNa=gN
z%iBRUyfjvDPlL%Yb3PqzFcW4FNoc9#J{~ZnYNs9;j-p{(&Y?UIW?=oEI}KZS3l%93
zI_+{K+HmqBnh?1Atu5XPukKoHU%FAqy3IW=stA32?spPpFGrgb7B!Q=-6S5O%ts=y|E3)5pI`Lcp6?X6wWJiMUom;8K$o`rIrU3At89KR8*QnYIF=aHSi?m
z)VPy2MRJ19ba)OyC(CPeOT}mlJ`9tzNnqt7Q~E_~@))_&@-gy9q>5pTcI5?Ra)b8S
zz!WzzPB#K|S=IMUmp6t9l8IrE4viKgX_9uuRG?Ft4wil*_nm}(|3PRPrs!KVgI;+4
z$A95jdTUc5<083Hj9Tdg(?BnXb#qdjS$bxtVMal7KyRQ?Pyu&BCWDxiqhx961dCUp
r;wW`vU&1n-!-Ri`IPH({1W)mdbZNRhN16WH<5;8n1bGgc+t=EEvSvb$

literal 0
HcmV?d00001

diff --git a/src/test/resources/record/SimpleRecord.java b/src/test/resources/record/SimpleRecord.java
new file mode 100644
index 0000000000..10316b07f8
--- /dev/null
+++ b/src/test/resources/record/SimpleRecord.java
@@ -0,0 +1,5 @@
+import javax.annotation.Nonnull;
+
+public record SimpleRecord(int aNumber,@Nonnull String aString) {
+
+}