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

improve code for generating warning messages containing option names

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 7
    • tools
    • b105
    • generic
    • generic
    • Not verified

      Various warning messages contain the name of a -Xlint suboption, as in

      [abc] your code might be wrong
      Use -Xlint:abc to see more details

      The use of literal embedded option names is fragile and susceptible to error. Further, such option names should not be localized.

      It would be better to replace all such names with an argument to the diagnostic. The argument should be a Lint.Category, which should possible be augmented to implement Formattable, to provide the loswer case text used in the option name.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: