Name: kbR10066 Date: 10/15/2002
Running instrumened class which has been compiled by new (JDK1.4) javac with
-Xjcov siwtch produces coverage file without source code positions. Compilation
by old javac (JDK13/bin/oldjavac -Xjcov a.java) leads to correct results (position
information will be available)
To reproduce:
1. Compile a "Hello world" program by new javac with -Xjcov:
> <JDK14>/bin/javac -Xjcov a.java
2. Instrument a.class by static instrumenter:
> java -cp <jcov.jar> -autocollection -saveatend=a.main -overwrite a.class
3. Run the program
> java -cp <jcov.jar>:. a
4.
> cat java.jcov
JCOV-DATA-FILE-VERSION: 2.0
CLASS: a [public]
SRCFILE: a.java
TIMESTAMP: 1034684593233
DATA: B
#kind line position count
METHOD: <init>()V [public]
1 1 0 0
3 1 0 0
METHOD: main([Ljava/lang/String;)V [public static]
1 3 0 1
3 3 0 1
======================================================================