The source file javac.properties contains the English message bundle for the javac tool.
Since the strings in this file are MessageFormat format strings, any single quotes must be escaped by doubling them.
Some of the messages do not have single quotes doubled. As a result, the single quotes are effectively eaten.
Example:
javac.properties:
javac.opt.Xlint.custom=\
Warnings to enable or disable, separated by comma.\n\
Precede a key by '-' to disable the specified warning.\n\
Use --help-lint to see the supported keys.
Actual output:
$ javac --help-extra
...
-Xlint:<key>(,<key>)*
Warnings to enable or disable, separated by comma.
Precede a key by - to disable the specified warning.
Use --help-lint to see the supported keys.
...
Note that what appears is "Precede a key by - to disable" instead of "Precede a key by '-' to disable" as was intended.
Since the strings in this file are MessageFormat format strings, any single quotes must be escaped by doubling them.
Some of the messages do not have single quotes doubled. As a result, the single quotes are effectively eaten.
Example:
javac.properties:
javac.opt.Xlint.custom=\
Warnings to enable or disable, separated by comma.\n\
Precede a key by '-' to disable the specified warning.\n\
Use --help-lint to see the supported keys.
Actual output:
$ javac --help-extra
...
-Xlint:<key>(,<key>)*
Warnings to enable or disable, separated by comma.
Precede a key by - to disable the specified warning.
Use --help-lint to see the supported keys.
...
Note that what appears is "Precede a key by - to disable" instead of "Precede a key by '-' to disable" as was intended.
- relates to
-
JDK-8298943 Missing escapes for single quote marks in compiler.properties
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/00ec1057
-
Review(master) openjdk/jdk/21816