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

javac generates incorrect line number information

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • tools
    • None
    • generic
    • generic

      (Note: this may be a duplicate of 4463373, but I am filing this anyway since the
      problem is still reproducible with the most recent promoted build.)

      Have noticed some "strange behavior" with JDK 1.4 for some time now; compiler
      errors that do not point to the correct line, and line number information at
      exception points that does not make sense. The root cause of this behavior is
      a bug introduced between b58 and b60. Extract the attached tar file (generates
      a subdirectory named "f16"), cd to the parent directory containing the f16
      subdirectory, and type "javac f16/*.java". With b58 and earlier (as well as
      earlier JDKs) the two errors flagged will be on lines 505 and 506. With b60
      and later they will incorrectly be flagged on lines 568 and 569.

      This is a must-fix for beta 2; the more serious problem is that, for example,
      NullPointerExceptions that get thrown point the user to the wrong line number
      in the source file, which makes debugging nearly impossible.

            gafter Neal Gafter (Inactive)
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: