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

JDI: InvalidLineNumberException not thrown by locationsOfLine()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-svc
    • beta
    • generic
    • generic
    • Not verified

      ReferenceType.locationsOfLine(int lineNumber) should throw
      InvalidLineNumberException if there is no executable code
      associated with the given line.
      Method tested with following line numbers.
      1. valid number.
      2. negative value(-100)
      3. line number of a comment line.
      4. line number of a blank line.
      For all the above values only empty list is returned and
      InvalidLineNumberException is not thrown.

      Testing done in JDK1.3.0-S build-Classic and Hotspot VMs.

       Steps to reproduce the bug
       ---------------------------
       1)Set path to latest JDK
       2)Compile the attached files with -g option
       3)Start the targetVM with the command
       java -Xdebug -Xnoagent
       -Xrunjdwp:transport="dt_socket",server=y,suspend=y,address=5670 TypeTest
       4)Start the debugger with the command
       java LineTest

       Attachments:
       ------------
       1. JDIScaffold.java
       2. VMConnection.java
       3. LineTest.java
       4. TypeTest.java

            rfield Robert Field (Inactive)
            sshakilasunw Shahulhameedmohaideenhaleema Shakila (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: