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