-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
ladybird
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2033115 | 1.4.0 | Neal Gafter | P3 | Closed | Fixed | beta |
This was originally reported in the debugger category, but appears to be a compiler bug, and a regression from 1.2.2.
This method:
public void testMethod1(final int t, int k) {
String s1 = "first";
final int z =0;
if(true) {
final float r = 10.00f;
boolean b = true;
System.out.println(r);
}
System.out.println("in testMethod2");
}
Results in the following variable table, as reported by javap:
Local variables for method void testMethod1(int, int)
LocalTest this pc=0, length=23, slot=0
int t pc=0, length=23, slot=1
int k pc=0, length=23, slot=2
java.lang.String s1 pc=3, length=19, slot=3
boolean b pc=6, length=8, slot=6
*** Original description follows:
Method.variables() does not return all the final local variables.
The returned list contains all the final local variables passed as arguments
to the method but does not contain final local variables which are declared
within the method.
Scenario:
---------
Debugger - MethodTest.java
Debugee - LocalTest.java
"z" and "r" in testMethod1 are not returned by Method.variables list
whereas "t" is returned.
All these variables are final variables. t is an argument to the method.
***Testing done in JDK1.3.0rc2-Y-Hotspot and Classic VM(WinNT and Solaris2.7)
Steps to reproduce the bug
---------------------------
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4326648
Follow the instructions in README to reproduce the bug.
This method:
public void testMethod1(final int t, int k) {
String s1 = "first";
final int z =0;
if(true) {
final float r = 10.00f;
boolean b = true;
System.out.println(r);
}
System.out.println("in testMethod2");
}
Results in the following variable table, as reported by javap:
Local variables for method void testMethod1(int, int)
LocalTest this pc=0, length=23, slot=0
int t pc=0, length=23, slot=1
int k pc=0, length=23, slot=2
java.lang.String s1 pc=3, length=19, slot=3
boolean b pc=6, length=8, slot=6
*** Original description follows:
Method.variables() does not return all the final local variables.
The returned list contains all the final local variables passed as arguments
to the method but does not contain final local variables which are declared
within the method.
Scenario:
---------
Debugger - MethodTest.java
Debugee - LocalTest.java
"z" and "r" in testMethod1 are not returned by Method.variables list
whereas "t" is returned.
All these variables are final variables. t is an argument to the method.
***Testing done in JDK1.3.0rc2-Y-Hotspot and Classic VM(WinNT and Solaris2.7)
Steps to reproduce the bug
---------------------------
The bug can be reproduced using the files in the location
/net/sqesvr/export/disk5/toolsbugs/4326648
Follow the instructions in README to reproduce the bug.
- backported by
-
JDK-2033115 Regression: Variable table entries not generated for some final locals
-
- Closed
-
- relates to
-
JDK-4382895 Regression test FinalLocals.java Failing
-
- Closed
-