ASF Bugzilla – Attachment 19834 Details for
Bug 39695
java.lang.ClassFormatError: LVTT entry for 'local' in class file org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
copying the LVTT entries from method to MethodGen
bcel-patch-method.txt (text/plain), 2.79 KB, created by
Erik Bengtson
on 2007-03-28 11:41:30 UTC
(
hide
)
Description:
copying the LVTT entries from method to MethodGen
Filename:
MIME Type:
Creator:
Erik Bengtson
Created:
2007-03-28 11:41:30 UTC
Size:
2.79 KB
patch
obsolete
>Index: D:/eclipse/workspaces/jpoxworkspace2/bcelhead/src/main/java/org/apache/bcel/generic/MethodGen.java >=================================================================== >--- D:/eclipse/workspaces/jpoxworkspace2/bcelhead/src/main/java/org/apache/bcel/generic/MethodGen.java (revision 523098) >+++ D:/eclipse/workspaces/jpoxworkspace2/bcelhead/src/main/java/org/apache/bcel/generic/MethodGen.java (working copy) >@@ -32,6 +32,7 @@ > import org.apache.bcel.classfile.LineNumberTable; > import org.apache.bcel.classfile.LocalVariable; > import org.apache.bcel.classfile.LocalVariableTable; >+import org.apache.bcel.classfile.LocalVariableTypeTable; > import org.apache.bcel.classfile.Method; > import org.apache.bcel.classfile.ParameterAnnotationEntry; > import org.apache.bcel.classfile.ParameterAnnotations; >@@ -237,6 +238,23 @@ > addLocalVariable(l.getName(), Type.getType(l.getSignature()), l > .getIndex(), start, end); > } >+ } else if (a instanceof LocalVariableTypeTable) { >+ LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable(); >+ removeLocalVariables(); >+ for (int k = 0; k < lv.length; k++) { >+ LocalVariable l = lv[k]; >+ InstructionHandle start = il.findHandle(l.getStartPC()); >+ InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength()); >+ // Repair malformed handles >+ if (null == start) { >+ start = il.getStart(); >+ } >+ if (null == end) { >+ end = il.getEnd(); >+ } >+ addLocalVariable(l.getName(), Type.getType(l.getSignature()), l >+ .getIndex(), start, end); >+ } > } else { > addCodeAttribute(a); > } >@@ -1062,6 +1080,13 @@ > signature = Utility.methodSignatureToString(signature, name, access, true, > getLocalVariableTable(cp)); > StringBuffer buf = new StringBuffer(signature); >+ for (int i = 0; i < getAttributes().length; i++) { >+ Attribute a = getAttributes()[i]; >+ if (!((a instanceof Code) || (a instanceof ExceptionTable))) { >+ buf.append(" [").append(a.toString()).append("]"); >+ } >+ } >+ > if (throws_vec.size() > 0) { > for (Iterator e = throws_vec.iterator(); e.hasNext();) { > buf.append("\n\t\tthrows ").append(e.next());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 39695
: 19834