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

JavaDoc comments throw off javac line numbers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic, x86
    • OS:
      generic, windows_nt, windows_2000
    • Verification:
      Verified

      Description



      Name: bsC130419 Date: 05/25/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)


      JavaDoc comments in Java source file throw off line and column values used by
      javac for error reporting and class file debug info. It seems every JavaDoc
      comment line adds one too many lines to the overall line count.


      /**
       * Each line in JavaDoc comment throws off javac line numbers in
       * both error reporting and class file generation.
       */
      public class JavacBug {
          void a(String i) {
              i++;
          }
      }//------|


      When compiled, produces the result:


      JavacBug.java:9: operator ++ cannot be applied to java.lang.String
      }//------|
               ^
      1 error


      The actual error is on line 7, not 9.
      (Review ID: 125044)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gafter Neal Gafter
              Reporter:
              bstrathesunw Bill Strathearn (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: