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

Incorrect comment alignment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • tools
    • 8.0 b126

    • b04
    • Verified

        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).

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

                Created:
                Updated:
                Resolved: