Apache Commons logo Commons BCEL


Release History

Version Date Description
6.3.1 2019-03-20 Bug fix release
6.3 2019-01-23 Experimental Java 9, 10, 11, 12-EA, and 13-EA Support
6.2 2017-12-08 Experimental Java 9 Support
6.1 2017-09-14 Experimental Java 9 Support
6.0 2016-07-10 Apache Commons BCEL 6.0 is a major release supporting the new features introduced in Java 6, 7 and 8. 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 which implemented this interface in 5.2 now use the constants defined in the org.apache.bcel.Const class. - The constant interface org.apache.bcel.generic.InstructionConstants has been deprecated. Classes which implemented this interface in 5.2 now use the constants defined in the org.apache.bcel.generic.InstructionConsts class. - Return type of method 'public java.lang.Object getElementAt(int)' in org.apache.bcel.verifier.VerifierFactoryListModel has been changed to java.lang.String. - The BCEL classes do no longer implement java.io.Serializable. Source compatible - Yes, sort of; - The org.apache.bcel.classfile.Visitor interface has been enhanced with additional methods. If you implemented it directly instead of extending the EmptyVisitor class you'll have to implement the new methods. - The org.apache.bcel.generic.Visitor interface has been enhanced with an additional method. If you implemented it directly instead of extending the EmptyVisitor class you'll have to implement the new methods. Semantic compatible - Yes, except: - BCEL 6.0 handles new attributes such as code annotations that could only be processed by implementing a custom AttributeReader in the previous versions. Code relying on this behavior will have to be adjusted since the AttributeReader will no longer be called in these cases. For full information about API changes please see the extended Clirr report: http://commons.apache.org/bcel/clirr-report.html

Release 6.3.1 – 2019-03-20

Type Changes By
Fix Race conditions on static fields in BranchHandle and InstructionHandle. Fixes BCEL-267. Thanks to Stephan Herrmann, Sebb, Gary Gregory, Torsten Curdt. ggregory
Fix Possible NPE in override implementation of Object.equals (#20). Fixes BCEL-297. Thanks to Mark Roberts, mingleizhang. ggregory
Update Add some files to .gitignore (#19). Fixes BCEL-298. Thanks to mingleizhang. ggregory
Fix NullPointerException at org.apache.bcel.classfile.FieldOrMethod.dump(). Fixes BCEL-315. Thanks to Gary Gregory. ggregory

Release 6.3 – 2019-01-23

Type Changes By
Fix ClassPath.getClassFile() and friends do not work with JDK 9 and higher (PR #22.). Fixes BCEL-304. Thanks to Gary Gregory, Ed Pavlak. ggregory
Fix ClassPath.getClassFile() and friends do not work with JRE 9 and higher. Fixes BCEL-305. Thanks to Gary Gregory. ggregory
Update Initial support for Java 11 Thanks to Mark Thomas, Gary Gregory. ggregory
Add Added org.apache.bcel.classfile.Visitor.visitConstantDynamic(ConstantDynamic) Thanks to Mark Thomas. ggregory
Add Added org.apache.bcel.classfile.ConstantDynamic Thanks to Mark Thomas. ggregory
Add Added fields in org.apache.bcel.Const for Java 9, 10, and 11. Thanks to Mark Thomas. ggregory
Add Added fields in org.apache.bcel.Const for Java 12 and 13 based on Java Early Access releases. Thanks to Mark Thomas. ggregory
Update Update Java requirement from Java 7 to Java 8. Thanks to Gary Gregory. ggregory

Release 6.2 – 2017-12-08

Type Changes By
Fix Incorrect comment in StackMap.java. Fixes BCEL-294. Thanks to Mark Roberts. britter
Fix Incorrect comment in several classes. Fixes BCEL-296. Thanks to Mark Roberts. ggregory
Fix Fix local variable live range length; add test case. Fixes BCEL-295. Thanks to Mark Roberts. ggregory
Fix org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19. Fixes BCEL-300. ggregory
Fix org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 20. Fixes BCEL-301. ggregory

Release 6.1 – 2017-09-14

Type Changes By
Add Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility. Fixes BCEL-293. britter
Add Add minimal Java 9 support. Fixes BCEL-292. markt
Fix Utility.signatureToString fails if a method has multiple type arguments. Fixes BCEL-286. Thanks to Mark Roberts. britter
Fix IINC does not handle -128 properly. Fixes BCEL-287. Thanks to Mark Roberts. britter
Fix Support for StackMap should be different from StackMapTable. Fixes BCEL-283. Thanks to Mark Roberts. britter
Fix Crash when parsing constructor of inner classes with parameters annotated. Fixes BCEL-289. kinow
Fix LocalVariableTypeTable is not updated. Fixes BCEL-276. Thanks to Sam Yoon, Mark Roberts. britter
Fix Resolving the String representation of a constant throws NoSuchElementException in case of CONSTANT_NameAndType constant. Fixes BCEL-277. Thanks to Sam Yoon. britter

Release 6.0 – 2016-07-10

Type Changes By
Update InvokeInstruction.getClassName(ConstantPoolGen) should not throw an exception when it detects an array. Fixes BCEL-262. Thanks to Mark Roberts. britter
Fix non-empty final arrays should be private as they are mutable. Fixes BCEL-237. sebb
Update Document the Java platform requirement clearly and early. Fixes BCEL-230. britter
Fix Type.getType() needs to understand TypeVariableSignature(s). Fixes BCEL-243.
Add Add constants for Java 9 class file version 53. Fixes BCEL-272.
Fix FCONST pattern does not include FCONST_2. Fixes BCEL-271.
Fix Add missing Node.accept() implementations (ConstantMethodHandle, ConstantMethodType, ParameterAnnotationEntry). Fixes BCEL-264.
Fix BCELifier is not working for Java8Example (incomplete). Fixes BCEL-221.
Fix Addition of hashCode() to generic/Instruction.java breaks Targeters. Never make distinct BranchInstructions compare equal. Fixes BCEL-195.
Fix Select constructor allows partially constructed instance to escape. Re-ordered code to delay the escape. Fixes BCEL-261.
Fix Minor doc error in BranchInstruction.java. Fixes BCEL-259.
Fix ClassDumper example duplicates field attribute types. Fixes BCEL-260.
Fix No tests to check the output of dump methods. Fixes BCEL-258.
Fix INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL need to define dump() methods. Fixes BCEL-257.
Fix Two more methods that would be nice to be public. Fixes BCEL-254.
Fix Type class includes constants that reference subclasses. Fixes BCEL-245.
Fix Pass 3b verifier is too strict. Fixes BCEL-253.
Fix StackMapTable[Entry] should be removed and improvements merged into StackMap[Entry]. Fixes BCEL-248.
Fix StackMap[Table]Entry.copy() needs to be deep; Improved support for StackMaps. Fixes BCEL-202.
Fix Pass3aVerifier visitANEWARRAY() does not allow 255 array dimensions. Fixes BCEL-251.
Update Some additional clone methods should be public. Fixes BCEL-211.
Fix Check for max Short seems wrong. Fixes BCEL-249.
Update Document that Instruction Factory returns singleton instances. Fixes BCEL-127.
Update better support for clone/copy methods. Fixes BCEL-198.
Remove Remove Serializable. Fixes BCEL-242.
Remove Problem with JAXB if the bcel classloader is used; remove the broken ClassLoader class. Fixes BCEL-110.
Update modify several toString methods to make output similar to "javap". Fixes BCEL-201.
Update add javadoc comments to LineNumber.java and LineNumberTable.java. Fixes BCEL-205.
Fix Need to check for an empty InstructionList. Fixes BCEL-208.
Update Inconsistent toString() results. Fixes BCEL-212.
Fix long type instructions are not searched by InstructionFinder using regular expression. Fixes BCEL-217.
Update Update Java requirement from 5 to 7. Fixes BCEL-244. ggregory
Fix Interfaces should not be used to define constants. Fixes BCEL-239.
Fix Code must not swallow Throwable. Fixes BCEL-234.
Update Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput) public. Fixes BCEL-219. Thanks to Maxim Degtyarev.
Fix Bug fixes and improvements to InvokeDynamic and BootStrapMethods implementation. Fixes BCEL-209. Thanks to Mark Roberts.
Fix Verification error when an invoke references a method defined in superclass. Fixes BCEL-187. Thanks to Jérôme Leroux.
Fix Remove ObjectType cache. Fixes BCEL-218. Thanks to chas.
Fix The verifier now checks if methods with a void return type attempt to return an object. Fixes BCEL-184. Thanks to Jérôme Leroux.
Fix MethodGen.removeLocalVariable now properly unreference the removed variable from the targetters of the instruction handlers delimiting the scope of the variable. Fixes BCEL-207. Thanks to Mark Roberts.
Fix Utility.signatureToString() no longer throws a ClassFormatException on TypeVariables found in generic signatures. Fixes BCEL-197. Thanks to Mark Roberts.
Fix Removed the 'index' variable from the LocalVariableGen's hash code. Fixes BCEL-194. Thanks to Mark Roberts.
Fix The verifier should not check for run time compatibility of objects assigned to arrays. Fixes BCEL-193. Thanks to Jérôme Leroux. markt
Fix Correct verification of the return value of a method. Fixes BCEL-188. Thanks to Jérôme Leroux. markt
Fix Performance degradation with the UTF8 cache. getInstance no longer uses cache. Fixes BCEL-186. sebb
Fix org.apache.bcel.util.ClassLoaderRepository.loadClass(String) leaks input streams. Fixes BCEL-181. ggregory
Update Add parent type processing for ClassPath class. Fixes BCEL-76.
Update Add support for getResource and getResourceAsStream to ClassPath. Fixes BCEL-83.
Update Properly parse StackMapTable attributes in Java 6 classfiles. Fixes BCEL-92.
Update Javadoc overhaul. Fixes BCEL-104.
Update BCEL is unnecessarily slow. Fixes BCEL-119.
Update Add support for INVOKEDYNAMIC and MethodHandles. Fixes BCEL-157.
Update Why using unstable sort at MethodGen.getLocalVariables() ?. Fixes BCEL-160. sebb
Update Incorporate patch file from Findbugs. Fixes BCEL-163.
Update Implement the MethodParameters attribute. Fixes BCEL-175.
Fix Mistake in "Peephole optimizer" example at http://commons.apache.org/bcel/manual.html. Fixes BCEL-28.
Fix BCEL cannot be used as java.system.class.loader. Fixes BCEL-74.
Fix XSLT transforms broken in Turkish Locale. Fixes BCEL-77.
Fix java.lang.ClassFormatError: LVTT entry for 'local' in class file org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT entry. Fixes BCEL-79.
Fix ClassParser.parse() throws NullPointerException if class does not exist and ClassParser(String) constructor is used. Fixes BCEL-81.
Fix ArrayOutOfBoundsException in InstructionFinder. Fixes BCEL-85.
Fix Website: Incorrect URL for source; version 5.2 is not in the bug page. Fixes BCEL-87.
Fix bcelified method doesn't pass verification. Fixes BCEL-88.
Fix return type not verified by JustIce. Fixes BCEL-89.
Fix @since tag incorrect for Annotation classes in BCEL trunk. Fixes BCEL-94.
Fix InstructionFactory missing % operator for Float, Double. Fixes BCEL-95.
Fix Fields in Annotations and AnnotationEntry are inaccessible to subclasses. Fixes BCEL-96.
Fix Add support for getResources to ClassPath. Fixes BCEL-97.
Fix Two source files in repository are empty. Fixes BCEL-98.
Fix Maven POM file calls in apache regex but code does not use it. Fixes BCEL-99.
Fix ClassParser throws unintelligible Exception. Fixes BCEL-100.
Fix verifier raises an AssertionViolatedException when done against Java 5 files with generics/annotations. Fixes BCEL-101.
Fix Verifier fails in pass 2 with "Number of LocalVariableTable attributes of Code attribute" on static methods. Fixes BCEL-102.
Fix ParameterAnnotationEntries are read not dumped. Fixes BCEL-107.
Fix RuntimeVisible Annotations duplicated. Fixes BCEL-108.
Fix ARRAYLENGTH incorrectly not StackConsumer. Fixes BCEL-112.
Fix Error in method search() defined in org.apache.bcel.util.InstructionFinder. Fixes BCEL-114.
Fix Deleting all instructions of a list shows wrong behaviour. Fixes BCEL-115.
Fix Make BCEL JAR OSGi compatible. Fixes BCEL-120.
Fix ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile. Fixes BCEL-122.
Fix tableswitch/lookupswitch invalid alignment of 4-byte operands. Fixes BCEL-124.
Fix Incorrect size calculation in InstructionFinder. Fixes BCEL-125.
Fix Class files containing "ParameterAnnotations" are dumped incorrectly. Fixes BCEL-130.
Fix Class files containing "StackMapTable" attributes (on method code) are dumped incorrectly. Fixes BCEL-131.
Fix org.apache.bcel.classfile.ClassParser: NullPointerException caused by fileopen failed. Fixes BCEL-132.
Fix org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename. Fixes BCEL-133.
Fix ExecutionVisitor doesn't support Class constant type for LDC and LDC_W. Fixes BCEL-134.
Fix BCELifier issue: BCELFactory fails to handle float and long constants. Fixes BCEL-135.
Fix "Invalid method signature: TT;" when using MethodGen for a method having a generic parameter. Fixes BCEL-137.
Fix FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize() output. Fixes BCEL-138.
Fix org.apache.bcel.generic.Instruction.equals(Object) does not follow Object.equals(Object) rules. Fixes BCEL-140.
Fix Select instructions should implement StackConsumer instead of StackProducer. Fixes BCEL-141.
Fix Fix CPL License issues with EnclosingMethod.java and LocalVariableTypeTable.java. Fixes BCEL-143.
Fix Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output. Fixes BCEL-145.
Fix SyntheticRepository.loadClass() fails to close the inputStream. Fixes BCEL-146.
Fix BCELifier produces incorrect code for methods containing loads of class literals from constant pool. Fixes BCEL-148.
Fix Code attribute size not updated. Fixes BCEL-151.
Fix Incorrect link for Jasmin assembler language. Fixes BCEL-152.
Fix Examples not present in source or binary downloads. Fixes BCEL-153. sebb
Fix ClassParser.parse() generates NPE if it cannot open the file. Fixes BCEL-154.
Fix InstConstraintVisitor does not handle class constants. Fixes BCEL-155.
Fix Pass3bVerifier crashes on empty methods. Fixes BCEL-156.
Fix LocalVariableGen.getLocalVariable() computes incorrect length. Fixes BCEL-159.
Fix Method does not have a method to access parameter annotations. Fixes BCEL-164.
Fix ClassPath.getResource does not correctly perform URL escaping. Fixes BCEL-167.
Fix ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool. Fixes BCEL-173.
Fix Verification of interfaces with default methods fails with Java 8. Fixes BCEL-174.
Fix When reading the number of parameters in a MethodParameters structure only read a single byte as per the JVM specification. Fixes BCEL-177. markt