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

Incorrect comment alignment

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: tools
    • Environment:

      8.0 b126

    • Subcomponent:
    • Resolved In Build:
      b04
    • Verification:
      Verified

      Backports

        Description

        1. The Javap's output for small (zero) column number (specified with -XDtab option) looks like:
        .............
        Constant pool:
           #1 = Methodref #19.#54// java/lang/Object."<init>":()V
           #2 = String #55// PUBLIC FINAL CONSTANT
           #3 = Fieldref #18.#56// StructureSampleClass.publicFinalConstant:Ljava/lang/String;
           #4 = String #57// PROTECTED FINAL CONSTANT
           #5 = Fieldref #18.#58// StructureSampleClass.protectedFinalConstant:Ljava/lang/String;
           #6 = String #59// PRIVATE FINAL CONSTANT
        .....................
        At least one space symbol should be added (or it would be even better to check a minimum column position to align comments within a logical block of output.

        2. The actual comment position is not equal to the specified value but shifted by the current indent value (so comments in the constant pool and the code section are placed on different positions).

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jjg Jonathan Gibbons
                Reporter:
                ogb Oleg Barbashov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: