`javap -l EmptyLoop` currently outputs the LineNumberTable/LocalVariableTable, even without the `-c` flag. This means there is output, which references instructions and lines of code, for which there is no context.
I propose to remove this output, thereby coupling the `-c` and `-l` flag. For the `-l` without `-c` case I propose outputting a warning and no LineNumberTable/LocalVariableTable information.
This proposal stems from discussion in: https://github.com/openjdk/jdk/pull/22359
Example for `javap -l EmptyLoop`
```
Compiled from "EmptyLoop.java"
public class EmptyLoop {
public EmptyLoop();
Code:
LineNumberTable:
line 1: 0
public void emptyLoop();
Code:
LineNumberTable:
line 3: 0
line 5: 14
}
```
I propose to remove this output, thereby coupling the `-c` and `-l` flag. For the `-l` without `-c` case I propose outputting a warning and no LineNumberTable/LocalVariableTable information.
This proposal stems from discussion in: https://github.com/openjdk/jdk/pull/22359
Example for `javap -l EmptyLoop`
```
Compiled from "EmptyLoop.java"
public class EmptyLoop {
public EmptyLoop();
Code:
LineNumberTable:
line 1: 0
public void emptyLoop();
Code:
LineNumberTable:
line 3: 0
line 5: 14
}
```
- relates to
-
JDK-8035271 Incorrect indentation of LineNumberTable/LocalVariableTable/Exception table/LocalVariableTypeTable/StackMapTable/RuntimeVisibleTypeAnnotations in verbose mode
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/ed03f0d9
-
Review(master) openjdk/jdk/22434