Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8343412

Missing escapes for single quote marks in javac.properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 24
    • None
    • tools
    • None
    • b23
    • generic
    • generic

      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.

            acobbs Archie Cobbs
            acobbs Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: