-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
generic
-
generic
Name: ssC76496 Date: 06/03/99
The disassembled code is different in 1.3 which doesnt happen in 1.2
The line number for the method declaration is not
given out when disassembled with -l option.
For example, in JDK 1.2.x the output is
Line numbers for method void private_good()
line 28: 0
line 27: 5
in JDK1.3
Line numbers for method void private_good()
line 28: 0
Steps to reproduce in 1.3
-------------------------
1. Set path to JDK1.3
2. javac A.java B.java
3. javap -l A > out3.log
Steps to reproduce in 1.2
-------------------------
1. Set path to JDK1.2
2. javac A.java B.java
3. javap -l A > out2.log
Javac Testcases are failing because of this conflict with the gold files.
Files needed
------------
A.java:
class A {
private int myprivate;
public static void main(String[] args) {
System.setErr(System.out);
A a = new A();
a.private_good();
a.public_final_good();
a.static_good();
a.public_good();
a.public_final_bad();
a.static_bad(a);
B b = new B();
b.public_final_good();
b.static_good();
b.public_good();
b.public_final_bad();
b.static_bad(b);
}
private void private_good() {
zing("A private_good");
}
public final void public_final_good() {
zing("A public_final_good");
}
static void static_good() {
zing("A static_good");
}
public void public_good() {
zing("A public_good");
}
public final void public_final_bad() {
myprivate = 2;
zing("A public_final_bad");
}
static void static_bad(A arg) {
arg.myprivate = 3;
zing("A static_bad");
}
private static void zing(String s) {
new Exception(s).printStackTrace();
}
}
----------------------------------------------------------------
B.java:
class B {
private int myprivate;
public final void public_final_good() {
zing("B public_final_good");
}
static void static_good() {
zing("B static_good");
}
public void public_good() {
zing("B public_good");
}
public final void public_final_bad() {
myprivate = 4;
zing("B public_final_bad");
}
static void static_bad(B arg) {
arg.myprivate = 5;
zing("B static_bad");
}
private static void zing(String s) {
new Exception(s).printStackTrace();
}
}
--------------------------------------------------------
======================================================================
- duplicates
-
JDK-4238641 Implicit return on void methods not assigned line number
-
- Closed
-