Author: dbrosius
Date: Sun Mar 13 18:05:33 2011
New Revision: 1081178
URL: http://svn.apache.org/viewvc?rev=1081178&view=rev
Log:
Bug 50922
: Code attribute size not updated
added calculating for setCode() and setExceptionTable()
Modified:
jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Code.java
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Code.java
URL:
http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Code.java?rev=1081178&r1=1081177&r2=1081178&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Code.java
(original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Code.java Sun
Mar 13 18:05:33 2011
@@ -268,6 +268,7 @@ public final class Code extends Attribut
public final void setCode( byte[] code ) {
this.code = code;
code_length = (code == null) ? 0 : code.length;
+ length = calculateLength(); // Adjust length
}
@@ -277,6 +278,7 @@ public final class Code extends Attribut
public final void setExceptionTable( CodeException[] exception_table ) {
this.exception_table = exception_table;
exception_table_length = (exception_table == null) ? 0 :
exception_table.length;
+ length = calculateLength(); // Adjust length
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]