Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental support for Java 13 class files #835

Merged
merged 4 commits into from
Jan 22, 2019
Merged

Add experimental support for Java 13 class files #835

merged 4 commits into from
Jan 22, 2019

Conversation

Godin
Copy link
Member

@Godin Godin commented Jan 22, 2019

No description provided.

@Godin Godin requested a review from marchof January 22, 2019 18:46
@Godin Godin self-assigned this Jan 22, 2019
@Godin Godin added this to the 0.8.3 milestone Jan 22, 2019
@Godin Godin added this to Implementation in Current work items via automation Jan 22, 2019
@marchof marchof merged commit 2034d40 into master Jan 22, 2019
Current work items automation moved this from Implementation to Done Jan 22, 2019
@marchof marchof deleted the java13 branch January 22, 2019 22:24
@Godin
Copy link
Member Author

Godin commented Jan 23, 2019

@marchof for the record here is end-to-end test:

$ mkdir src

$ cat <<END > src/Example.java
class Example {
  public static void main(String[] args) {
    System.out.println("Hello, Java 13!");
  }
}
END

$ java -version
openjdk version "13-ea" 2019-09-17
OpenJDK Runtime Environment (build 13-ea+4)
OpenJDK 64-Bit Server VM (build 13-ea+4, mixed mode, sharing)

$ javac --release 13 src/Example.java -d classes

$ javap -v -p classes/Example.class | grep major
  major version: 57

$ java -javaagent:jacoco/lib/jacocoagent.jar -cp classes Example
Hello, Java 13!

$ java -jar jacoco/lib/jacococli.jar classinfo classes/Example.class
  INST   BRAN   LINE   METH   CXTY   ELEMENT
     7      0      3      2      2   class 0x6ed8641f71bae73b Example

$ java -jar jacoco/lib/jacococli.jar instrument classes --dest instrumented
[INFO] 1 classes instrumented to /tmp/example/instrumented.

$ javap -v -p instrumented/Example.class | grep major
  major version: 57

$ java -cp instrumented:jacoco/lib/jacocoagent.jar Example
Hello, Java 13!

$ java -jar jacoco/lib/jacococli.jar execinfo jacoco.exec
[INFO] Loading exec file jacoco.exec.
CLASS ID         HITS/PROBES   CLASS NAME
Session "godin-laptop2-7ab9aa52": Wed Jan 23 01:47:30 CET 2019 - Wed Jan 23 01:47:31 CET 2019
6ed8641f71bae73b    1 of   2   Example
Session "godin-laptop2-26fcc118": Wed Jan 23 01:48:43 CET 2019 - Wed Jan 23 01:48:43 CET 2019
6ed8641f71bae73b    1 of   2   Example

$ java -jar jacoco/lib/jacococli.jar report jacoco.exec --classfiles classes 
[INFO] Loading execution data file /tmp/example/jacoco.exec.
[INFO] Analyzing 1 classes.

@jacoco jacoco locked as resolved and limited conversation to collaborators May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants