blob: cb0f3fbf8b0b1f4a8315dbbb426ccb4d4a0c8fbe [file] [log] [blame]
Benedikt Ritterda12cc02016-06-18 13:36:50 +00001 Apache Commons BCEL
Gary D. Gregoryde2ee672017-11-30 21:01:51 +00002 Version 6.2
3 RELEASE NOTES
4
5
6INTRODUCTION:
7
8The Apache Commons BCEL team is pleased to announce the release of
9Apache Commons BCEL 6.2!
10
11The Byte Code Engineering Library (BCEL) is intended to give users a convenient
12way to analyze, create, and manipulate compiled .class files. Classes are
13represented by objects containing all the symbolic information of the given
14class: methods, fields and byte code instructions.
15
16Experimental Java 9 Support
17
18FIXED BUGS:
19===========
20
21o BCEL-294: Incorrect comment in StackMap.java Thanks to Mark Roberts.
22o BCEL-296: Incorrect comment in several classes. Thanks to Mark Roberts.
23o BCEL-295: Fix local variable live range length; add test case. Thanks to Mark Roberts.
24o BCEL-300: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19.
25o BCEL-301: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 20.
26
27
28Have fun!
29-Apache Commons BCEL team
30
31Feedback
32--------
33
34Open source works best when you give feedback:
35
36 http://commons.apache.org/bcel
37
38Please direct all bug reports to JIRA:
39
40 https://issues.apache.org/jira/browse/BCEL
41
42Or subscribe to the commons-user mailing list
43
44The Apache Commons Team
45
46-----------------------------------------------------------------------------
47
48 Apache Commons BCEL
Benedikt Ritter9f554c12017-09-14 19:42:25 +000049 Version 6.1
Benedikt Ritterda12cc02016-06-18 13:36:50 +000050 RELEASE NOTES
Emmanuel Bourg083ba612014-04-25 22:41:32 +000051
Benedikt Ritterda12cc02016-06-18 13:36:50 +000052
53INTRODUCTION:
54
Sebastian Bazley47c0e902016-06-23 21:56:18 +000055The Apache Commons BCEL team is pleased to announce the release of
Benedikt Ritter9f554c12017-09-14 19:42:25 +000056Apache Commons BCEL 6.1!
57
58The Byte Code Engineering Library (BCEL) is intended to give users a convenient
59way to analyze, create, and manipulate compiled .class files. Classes are
60represented by objects containing all the symbolic information of the given
61class: methods, fields and byte code instructions.
62
63Apache Commons BCEL 6.1 is a bugfix and feature release supporting bringing
64experimental support for Java 9.
65
66It requires Java 7 or higher to run.
67
68
69COMPATIBILITY with 6.1
70======================
71
72Binary compatible - Yes
73
74Source compatible - Yes, sort of;
75 - The org.apache.bcel.classfile.Visitor interface has been enhanced with
76 additional methods. If you implemented it directly instead of extending
77 the EmptyVisitor class you'll have to implement the new methods.
78 - The org.apache.bcel.generic.Visitor interface has been enhanced with an
79 additional method. If you implemented it directly instead of extending
80 the EmptyVisitor class you'll have to implement the new methods.
81
82Semantic compatible - Yes
83
84For full information about API changes please see the extended Clirr report:
85
86
87http://commons.apache.org/bcel/clirr-report.html
88
89
90COMPATIBILITY with Java 9
91=========================
92
93The MANIFEST.MF now contains an additional entry:
94
95 Automatic-Module-Name: org.apache.bcel
96
97This should make it possible to use Commons BCEL 6.1 as a module in the Java 9
98module system. For more information see the corresponding issue and the
99referenced mailing list discussions:
100
101https://issues.apache.org/jira/browse/BCEL-293
102
103The build currently on Java 9 fails with test failures related to Locales. We
104are still working on this. For more information see:
105
106https://issues.apache.org/jira/browse/BCEL-275
107
108
109NEW FEATURES:
110=============
111
112o BCEL-293: Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility.
113o BCEL-292: Add minimal Java 9 support.
114
115FIXED BUGS:
116===========
117
118o BCEL-286: Utility.signatureToString fails if a method has multiple type
119 arguments. Thanks to Mark Roberts.
120o BCEL-287: IINC does not handle -128 properly. Thanks to Mark Roberts.
121o BCEL-283: Support for StackMap should be different from StackMapTable.
122 Thanks to Mark Roberts.
123o BCEL-289: Crash when parsing constructor of inner classes with parameters
124 annotated.
125o BCEL-276: LocalVariableTypeTable is not updated.
126 Thanks to Sam Yoon, Mark Roberts.
127o BCEL-277: Resolving the String representation of a constant throws
128 NoSuchElementException in case of CONSTANT_NameAndType constant.
129 Thanks to Sam Yoon.
130
131
132Have fun!
133-Apache Commons BCEL team
134
Gary D. Gregoryde2ee672017-11-30 21:01:51 +0000135-----------------------------------------------------------------------------
Benedikt Ritter9f554c12017-09-14 19:42:25 +0000136
137 Release Notes for 6.0
138
139
140INTRODUCTION:
141
142The Apache Commons BCEL team is pleased to announce the release of
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000143Apache Commons BCEL 6.0!
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000144
145The Byte Code Engineering Library (BCEL) is intended to give users a convenient
146way to analyze, create, and manipulate compiled .class files. Classes are
147represented by objects containing all the symbolic information of the given
148class: methods, fields and byte code instructions.
149
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000150Apache Commons BCEL 6.0 is a major release supporting the new features
151introduced in Java 6, 7 and 8.
Sebastian Bazley1c0235a2015-08-19 22:17:18 +0000152
153It requires Java 7 or higher to run.
Torsten Curdte71856f2006-03-20 12:43:18 +0000154
155
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000156COMPATIBILITY with 5.2
157======================
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000158
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000159Binary compatible - not strictly compatible
160- The constant interface org.apache.bcel.Constants has been deprecated. Classes
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000161 which implemented this interface in 5.2 now use the constants defined in the
162 org.apache.bcel.Const class.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000163- The constant interface org.apache.bcel.generic.InstructionConstants has been
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000164 deprecated. Classes which implemented this interface in 5.2 now use the
165 constants defined in the org.apache.bcel.generic.InstructionConsts class.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000166- Return type of method 'public java.lang.Object getElementAt(int)' in
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000167 org.apache.bcel.verifier.VerifierFactoryListModel has been changed to
168 java.lang.String.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000169- The BCEL classes do no longer implement java.io.Serializable.
Torsten Curdte71856f2006-03-20 12:43:18 +0000170
Chas Hontonf3f9e9b2015-08-09 21:21:10 +0000171Source compatible - Yes, sort of;
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000172 - The org.apache.bcel.classfile.Visitor interface has been enhanced with
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000173 additional methods. If you implemented it directly instead of extending
174 the EmptyVisitor class you'll have to implement the new methods.
Sebastian Bazleyd7bb2552016-06-23 22:01:23 +0000175 - The org.apache.bcel.generic.Visitor interface has been enhanced with an
176 additional method. If you implemented it directly instead of extending
177 the EmptyVisitor class you'll have to implement the new methods.
Torsten Curdte71856f2006-03-20 12:43:18 +0000178
Emmanuel Bourg45cc0062015-02-23 17:24:07 +0000179Semantic compatible - Yes, except:
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000180 - BCEL 6.0 handles new attributes such as code annotations that could only
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000181 be processed by implementing a custom AttributeReader in the previous
182 versions. Code relying on this behavior will have to be adjusted since
183 the AttributeReader will no longer be called in these cases.
Torsten Curdte71856f2006-03-20 12:43:18 +0000184
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000185For full information about API changes please see the extended Clirr report:
Torsten Curdt30110ff2010-01-10 19:22:40 +0000186
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000187
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000188http://commons.apache.org/bcel/clirr-report.html
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000189
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000190NEW FEATURES:
191=============
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000192
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000193o BCEL-272: Add constants for Java 9 class file version 53.
194
195FIXED BUGS:
196===========
197
Benedikt Rittercc1c0fb2016-06-18 13:57:51 +0000198o BCEL-237: non-empty final arrays should be private as they are mutable.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000199o BCEL-243: Type.getType() needs to understand TypeVariableSignature(s).
200o BCEL-271: FCONST pattern does not include FCONST_2.
201o BCEL-264: Add missing Node.accept() implementations (ConstantMethodHandle,
202 ConstantMethodType, ParameterAnnotationEntry).
203o BCEL-221: BCELifier is not working for Java8Example (incomplete).
204o BCEL-195: Addition of hashCode() to generic/Instruction.java breaks Targeters.
205 Never make distinct BranchInstructions compare equal.
206o BCEL-261: Select constructor allows partially constructed instance to escape.
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000207 Re-ordered code to delay the escape.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000208o BCEL-259: Minor doc error in BranchInstruction.java.
209o BCEL-260: ClassDumper example duplicates field attribute types.
210o BCEL-258: No tests to check the output of dump methods.
211o BCEL-257: INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL need to define dump()
212 methods.
213o BCEL-254: Two more methods that would be nice to be public.
214o BCEL-245: Type class includes constants that reference subclasses.
215o BCEL-253: Pass 3b verifier is too strict.
216o BCEL-248: StackMapTable[Entry] should be removed and improvements merged into
217 StackMap[Entry].
218o BCEL-202: StackMap[Table]Entry.copy() needs to be deep; Improved support for
219 StackMaps.
220o BCEL-251: Pass3aVerifier visitANEWARRAY() does not allow 255 array dimensions.
221o BCEL-249: Check for max Short seems wrong.
222o BCEL-208: Need to check for an empty InstructionList.
223o BCEL-217: long type instructions are not searched by InstructionFinder using
224 regular expression.
225o BCEL-239: Interfaces should not be used to define constants.
226o BCEL-234: Code must not swallow Throwable.
227o BCEL-209: Bug fixes and improvements to InvokeDynamic and BootStrapMethods
228 implementation. Thanks to Mark Roberts.
229o BCEL-187: Verification error when an invoke references a method defined in
230 superclass. Thanks to Jérôme Leroux.
231o BCEL-218: Remove ObjectType cache. Thanks to chas.
232o BCEL-184: The verifier now checks if methods with a void return type attempt
233 to return an object. Thanks to Jérôme Leroux.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000234o BCEL-207: MethodGen.removeLocalVariable now properly unreference the removed
235 variable from the targetters of the instruction handlers delimiting
236 the scope of the variable. Thanks to Mark Roberts.
237o BCEL-197: Utility.signatureToString() no longer throws a ClassFormatException
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000238 on TypeVariables found in generic signatures. Thanks to Mark Roberts.
239o BCEL-194: Removed the 'index' variable from the LocalVariableGen's hash code. Thanks to Mark Roberts.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000240o BCEL-193: The verifier should not check for run time compatibility of objects
241 assigned to arrays. Thanks to Jérôme Leroux.
Sebastian Bazley47c0e902016-06-23 21:56:18 +0000242o BCEL-188: Correct verification of the return value of a method. Thanks to Jérôme Leroux.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000243o BCEL-186: Performance degradation with the UTF8 cache. getInstance no longer
244 uses cache.
245o BCEL-181: org.apache.bcel.util.ClassLoaderRepository.loadClass(String) leaks
246 input streams.
247o BCEL-28: Mistake in "Peephole optimizer" example
248 at http://commons.apache.org/bcel/manual.html
249o BCEL-74: BCEL cannot be used as java.system.class.loader.
250o BCEL-77: XSLT transforms broken in Turkish Locale.
251o BCEL-79: java.lang.ClassFormatError: LVTT entry for 'local' in class file
252 org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT
253 entry
254o BCEL-81: ClassParser.parse() throws NullPointerException if class does not
255 exist and ClassParser(String) constructor is used.
256o BCEL-85: ArrayOutOfBoundsException in InstructionFinder.
257o BCEL-87: Website: Incorrect URL for source; version 5.2 is not in the bug
258 page
259o BCEL-88: bcelified method doesn't pass verification.
260o BCEL-89: return type not verified by JustIce.
261o BCEL-94: @since tag incorrect for Annotation classes in BCEL trunk.
262o BCEL-95: InstructionFactory missing % operator for Float, Double.
263o BCEL-96: Fields in Annotations and AnnotationEntry are inaccessible to
264 subclasses
265o BCEL-97: Add support for getResources to ClassPath.
266o BCEL-98: Two source files in repository are empty.
267o BCEL-99: Maven POM file calls in apache regex but code does not use it.
268o BCEL-100: ClassParser throws unintelligible Exception.
269o BCEL-101: verifier raises an AssertionViolatedException when done against
270 Java 5 files with generics/annotations.
271o BCEL-102: Verifier fails in pass 2 with "Number of LocalVariableTable
272 attributes of Code attribute" on static methods.
273o BCEL-107: ParameterAnnotationEntries are read not dumped.
274o BCEL-108: RuntimeVisible Annotations duplicated.
275o BCEL-112: ARRAYLENGTH incorrectly not StackConsumer.
276o BCEL-114: Error in method search() defined in
277 org.apache.bcel.util.InstructionFinder
278o BCEL-115: Deleting all instructions of a list shows wrong behaviour.
279o BCEL-120: Make BCEL JAR OSGi compatible.
280o BCEL-122: ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile.
281o BCEL-124: tableswitch/lookupswitch invalid alignment of 4-byte operands.
282o BCEL-125: Incorrect size calculation in InstructionFinder.
283o BCEL-130: Class files containing "ParameterAnnotations" are dumped
284 incorrectly.
285o BCEL-131: Class files containing "StackMapTable" attributes (on method code)
286 are dumped incorrectly.
287o BCEL-132: org.apache.bcel.classfile.ClassParser: NullPointerException caused
288 by fileopen failed.
289o BCEL-133: org.apache.bcel.classfile.ClassParser: NullPointerException caused
290 by invalid filename.
291o BCEL-134: ExecutionVisitor doesn't support Class constant type for LDC and
292 LDC_W.
293o BCEL-135: BCELifier issue: BCELFactory fails to handle float and long
294 constants.
295o BCEL-137: "Invalid method signature: TT;" when using MethodGen for a method
296 having a generic parameter.
297o BCEL-138: FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize()
298 output.
299o BCEL-140: org.apache.bcel.generic.Instruction.equals(Object) does not follow
300 Object.equals(Object) rules.
301o BCEL-141: Select instructions should implement StackConsumer instead of
302 StackProducer.
303o BCEL-143: Fix CPL License issues with EnclosingMethod.java and
304 LocalVariableTypeTable.java.
305o BCEL-145: Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output.
306o BCEL-146: SyntheticRepository.loadClass() fails to close the inputStream.
307o BCEL-148: BCELifier produces incorrect code for methods containing loads of
308 class literals from constant pool.
309o BCEL-151: Code attribute size not updated.
310o BCEL-152: Incorrect link for Jasmin assembler language.
311o BCEL-153: Examples not present in source or binary downloads.
312o BCEL-154: ClassParser.parse() generates NPE if it cannot open the file.
313o BCEL-155: InstConstraintVisitor does not handle class constants.
314o BCEL-156: Pass3bVerifier crashes on empty methods.
315o BCEL-159: LocalVariableGen.getLocalVariable() computes incorrect length.
316o BCEL-164: Method does not have a method to access parameter annotations.
317o BCEL-167: ClassPath.getResource does not correctly perform URL escaping.
318o BCEL-173: ClassParser fails to parse JDK classes in Java 8:
319 ClassFormatException: Invalid byte tag in constant pool.
320o BCEL-174: Verification of interfaces with default methods fails with Java 8.
321o BCEL-177: When reading the number of parameters in a MethodParameters
322 structure only read a single byte as per the JVM specification.
323
324CHANGES:
325========
326
Benedikt Ritterfdc460d2016-07-10 20:02:39 +0000327o BCEL-262: InvokeInstruction.getClassName(ConstantPoolGen) should not throw
328 an exception when it detects an array. Thanks to Mark Roberts.
Benedikt Ritter648f7532016-06-18 13:48:36 +0000329o BCEL-230: Document the Java platform requirement clearly and early.
Benedikt Ritterda12cc02016-06-18 13:36:50 +0000330o BCEL-211: Some additional clone methods should be public.
331o BCEL-127: Document that Instruction Factory returns singleton instances.
332o BCEL-198: better support for clone/copy methods.
333o BCEL-201: modify several toString methods to make output similar to "javap".
334o BCEL-205: add javadoc comments to LineNumber.java and LineNumberTable.java.
335o BCEL-212: Inconsistent toString() results.
336o BCEL-244: Update Java requirement from 5 to 7.
337o BCEL-219: Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput)
338 public. Thanks to Maxim Degtyarev.
339o BCEL-76: Add parent type processing for ClassPath class.
340o BCEL-83: Add support for getResource and getResourceAsStream to ClassPath.
341o BCEL-92: Properly parse StackMapTable attributes in Java 6 classfiles.
342o BCEL-104: Javadoc overhaul.
343o BCEL-119: BCEL is unnecessarily slow.
344o BCEL-157: Add support for INVOKEDYNAMIC and MethodHandles.
345o BCEL-160: Why using unstable sort at MethodGen.getLocalVariables() ?
346o BCEL-163: Incorporate patch file from Findbugs.
347o BCEL-175: Implement the MethodParameters attribute.
348
349REMOVED:
350========
351o BCEL-242: Remove Serializable.
352o BCEL-110: Problem with JAXB if the bcel classloader is used; remove the broken
353 ClassLoader class.
Chas Honton21ddc872015-08-09 23:35:20 +0000354
355
356Have fun!
357-Apache Commons BCEL team
Emmanuel Bourgeaf7e8a2014-12-17 14:10:42 +0000358
Torsten Curdte71856f2006-03-20 12:43:18 +0000359Feedback
360--------
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000361
Torsten Curdte71856f2006-03-20 12:43:18 +0000362Open source works best when you give feedback:
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000363
364 http://commons.apache.org/bcel
Torsten Curdte71856f2006-03-20 12:43:18 +0000365
Emmanuel Bourg9b4dd372014-04-24 09:42:30 +0000366Please direct all bug reports to JIRA:
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000367
368 https://issues.apache.org/jira/browse/BCEL
Torsten Curdte71856f2006-03-20 12:43:18 +0000369
Emmanuel Bourg9b4dd372014-04-24 09:42:30 +0000370Or subscribe to the commons-user mailing list
Torsten Curdte71856f2006-03-20 12:43:18 +0000371
Emmanuel Bourg083ba612014-04-25 22:41:32 +0000372The Apache Commons Team