-
Bug
-
Resolution: Fixed
-
P4
-
8
-
8.0 b126
-
b04
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8045124 | 8u25 | Alexander Zuev | P4 | Resolved | Fixed | b01 |
JDK-8033975 | 8u20 | Alexander Zuev | P4 | Resolved | Fixed | b03 |
JDK-8052563 | emb-8u26 | Alexander Zuev | P4 | Resolved | Fixed | b17 |
Compile and get javap's output for any class that contains final fields with "-constants" option, e.g.
class SimpleClass {
public final String FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
public static String STATIC_CONSTANT = "Lorem ipsum dolor sit amet...";
public static final String STATIC_FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
}
The output message contains the value of the non-static final field:
....
public final java.lang.String FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
public static java.lang.String STATIC_CONSTANT;
public static final java.lang.String STATIC_FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
....
According to the help message only the "static final" constant values should be included ("-constants Show static final constants")
class SimpleClass {
public final String FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
public static String STATIC_CONSTANT = "Lorem ipsum dolor sit amet...";
public static final String STATIC_FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
}
The output message contains the value of the non-static final field:
....
public final java.lang.String FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
public static java.lang.String STATIC_CONSTANT;
public static final java.lang.String STATIC_FINAL_CONSTANT = "Lorem ipsum dolor sit amet...";
....
According to the help message only the "static final" constant values should be included ("-constants Show static final constants")
- backported by
-
JDK-8033975 The values of non-static final fields are printed for the -constants option
-
- Resolved
-
-
JDK-8045124 The values of non-static final fields are printed for the -constants option
-
- Resolved
-
-
JDK-8052563 The values of non-static final fields are printed for the -constants option
-
- Resolved
-