Hi all.
I've just been trying to update my code to run on code compiled under 1.5.
Almost everything works flawlessly. Just this one thing...
For code like this:
static void startTarget(Class clazz) { // Only called from event thread.
final Class clazzz = clazz;
new TestInnerClass() {
public void run() {
Class c = clazzz;
}
};
}
where the variable clazzz must be passed to the inner class
TestInnerClass$1, the 1.5
compiler does not include it in the LVT, unlike 1.4. Here's the
constructor in question:
TestInnerClass$1(java.lang.Class);
Signature: (Ljava/lang/Class;)V
Code:
0: aload_0
1: aload_1
2: putfield #11; //Field val$clazzz:Ljava/lang/Class;
5: aload_0
6: invokespecial #14; //Method TestInnerClass."<init>":()V
9: return
LineNumberTable:
line 1: 0
line 10: 5
LocalVariableTable:
Start Length Slot Name Signature
0 10 0 this LTestInnerClass$1;
As is clear, the parameter in register 1 is not in the LVT. As near as
I've been able to make
out, the only way to find out that it even exists is to parse the string
in the signature. This
seems like an exceedingly awkward thing to do.
Ideas?
-Bil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]