-
Bug
-
Resolution: Fixed
-
P4
-
7-pool, 8, 9
-
b37
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085430 | emb-9 | Maurizio Cimadamore | P4 | Resolved | Fixed | team |
JDK-8087000 | 8u65 | Maurizio Cimadamore | P4 | Resolved | Fixed | b01 |
JDK-8077258 | 8u60 | Jan Lahoda | P4 | Resolved | Fixed | b14 |
JDK-8138429 | emb-8u65 | Unassigned | P4 | Resolved | Fixed | b01 |
JDK-8080037 | emb-8u60 | Maurizio Cimadamore | P4 | Resolved | Fixed | team |
Given a class containing a method switching on an enum, like this:
1: public class WeirdConstructorLinenumber
2: {
3: public void consider(java.math.RoundingMode mode) {
4: switch ( mode ) {}
5: }
6: }
javac generates a default constructor as expected.
But the generated constructor returns from line 4 (which really belongs to the "consider" method).
$ javac WeirdConstructorLinenumber.java
$ javap -c -l -classpath . WeirdConstructorLinenumber
Compiled from "WeirdConstructorLinenumber.java"
public class WeirdConstructorLinenumber {
public WeirdConstructorLinenumber();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 1: 0
line 4: 4
[...]
}
1: public class WeirdConstructorLinenumber
2: {
3: public void consider(java.math.RoundingMode mode) {
4: switch ( mode ) {}
5: }
6: }
javac generates a default constructor as expected.
But the generated constructor returns from line 4 (which really belongs to the "consider" method).
$ javac WeirdConstructorLinenumber.java
$ javap -c -l -classpath . WeirdConstructorLinenumber
Compiled from "WeirdConstructorLinenumber.java"
public class WeirdConstructorLinenumber {
public WeirdConstructorLinenumber();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
LineNumberTable:
line 1: 0
line 4: 4
[...]
}
- backported by
-
JDK-8077258 Wrong LineNumberTable for default constructors
-
- Resolved
-
-
JDK-8080037 Wrong LineNumberTable for default constructors
-
- Resolved
-
-
JDK-8085430 Wrong LineNumberTable for default constructors
-
- Resolved
-
-
JDK-8087000 Wrong LineNumberTable for default constructors
-
- Resolved
-
-
JDK-8138429 Wrong LineNumberTable for default constructors
-
- Resolved
-
- links to
(1 links to)