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

DiagnosticFormatter refactoring

XMLWordPrintable

    • b33
    • unknown
    • generic
    • Not verified

      The class DiagnosticFormatter has some problems:

      *) A single class is in charge for providing both raw format (-XdrawDiagnostics option) and standard format
      *) All the formatting logic is accomplished by a single formatter method format(JCDiagnostic)

      Those problems makes it very difficult to extend DiagnosticFormatter in order to provide more specific formatting capabilities:

      *) Any subclass of DiagnosticFormatter must preserve the raw format. Such format is exploited in locale-independent regression tests, so that any minimal change to the raw format will cause a lot of regression failures.

      *) It's not possible to redefine specific parts of the formatter's behavior (e.g. change the way in which the formatter renders a diagnostic's location) without redefining the whole formatting logic

      Please, refactor the DiagnosticFormatter class.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: