Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900434

Incomplete coverage for classes loaded repeteadly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jcov_1.1
    • jcov_1.1
    • tools
    • None
    • 1.1
    • generic
    • generic
    • Verified



      Name: kbR10066 Date: 01/30/2003


      If an application contains a class loaded via different class loaders several times
      during execution, coverage data is collected only for the first loaded copy.
      For example, if we run the test program from bug#4810478 like this:

      > $JDK140/bin/java -Xrunjcovt:t=m -cp classes a

      then coverage data for the class b (which is loaded twice) will be:

      ---------------------------------
      CLASS: b [public]
      SRCFILE: b.java
      TIMESTAMP: 1043328976233
      DATA: M
      #kind line position count
      METHOD: <init>()V [public]
      1 6 0 2
      METHOD: <clinit>()V [static]
      1 3 0 1
      ---------------------------------

      whereas it should be:

      ---------------------------------
      CLASS: b [public]
      SRCFILE: b.java
      TIMESTAMP: 1043328976233
      DATA: M
      #kind line position count
      METHOD: <init>()V [public]
      1 6 0 3
      METHOD: <clinit>()V [static]
      1 3 0 2
      ---------------------------------

      That is, the actual execution counters are greater than those
      stored in the coverage file.
      ======================================================================

            afedorch Alexey Fedorchenko (Inactive)
            klooney Kevin Looney (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: