Duplicate :
|
In the following program: $ cat Target01.java /** * Reproducer for Java 8 compiler issue where wrong line numbers are reported.. */ public class Target01 { static void m(boolean flag) { if (flag) { a(); } else { b(); // Wrong line number for this invocation (8 instead of 10) } } static void a() { } static void b() { } } The the call to b() is missing in the lnt: static void m(boolean); flags: ACC_STATIC Code: stack=1, locals=1, args_size=1 0: iload_0 1: ifeq 10 4: invokestatic #2 // Method a:()V 7: goto 13 10: invokestatic #3 // Method b:()V 13: return LineNumberTable: line 7: 0 line 8: 4 line 10: 10 line 12: 13 StackMapTable: number_of_entries = 2 frame_type = 10 /* same */ frame_type = 2 /* same */ Reported here: http://mail.openjdk.java.net/pipermail/compiler-dev/2013-July/007000.html