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

"duplicated class has no timestamp" warning, which causes incomplete results

XMLWordPrintable

    • 1.1
    • generic
    • generic
    • Verified



      Name: kbR10066 Date: 03/17/2003


      JCov agent when run with type=M option sometimes produces the following
      warning:

      *** JCOV WARNING : duplicated class has no timestamp (skipped): <class name>

      and the class mentioned in the warning is not then present in the resulting coverage
      file. At the same time this class is definitely loaded only once, so it is not duplicated.

      To reproduce, follow these steps (note that such failure can be quite intermittent):

      1. Compile b.java (source is below)
      % <JDK1.4.0>/bin/javac b.java

      2. Run class b under JCov:

      % JDK1.4.0>/bin/java \
      -Xmx9M \
      -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods \
      -Xrunjcov:t=M \
      -cp . \
      b
      You will then see many warnings such as described above.

      --- b.java ---
      public class b {
      public static void main(String[] args) {
      int HEAP_SIZE = 800000;

      for (int i = 0; i < 2; i++) {
      long[] arr = new long[HEAP_SIZE];
      System.out.println(arr[HEAP_SIZE - 1]);
      arr = null;
      System.gc();
      try {
      Thread.currentThread().sleep(1000);
      } catch (InterruptedException ie) {
      System.out.println("INTERRUPTED");
      }
      }
      }
      }
      --- end of b.java ---
      ======================================================================

            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: