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

Fix validation test for Java 21 #1422

Merged
merged 1 commit into from Mar 31, 2023
Merged

Conversation

Godin
Copy link
Member

@Godin Godin commented Mar 31, 2023

OpenJDK 21 EA b15 and b16 produce different class files for RecordPatternsTarget.java because of
openjdk/jdk@138cdc9

Here is diff between outputs of javap -v -p RecordPatternsTarget.class:

          line 34: 57
          line 35: 72
+         line 34: 78
          line 37: 92

Bytecode instructions at offset 78 correspond to the following exception handler generated for the case at line 34:

        78: astore_1
        79: new           #24                 // class java/lang/MatchException
        82: dup
        83: aload_1
        84: invokevirtual #26                 // Method java/lang/Throwable.toString:()Ljava/lang/String;
        87: aload_1
        88: invokespecial #30                 // Method java/lang/MatchException."<init>":(Ljava/lang/String;Ljava/lang/Throwable;)V
        91: athrow

OpenJDK 21 EA b15 and b16 produce different class files for
`RecordPatternsTarget.java` because of
openjdk/jdk@138cdc9

Here is diff between outputs of `javap -v -p RecordPatternsTarget.class`:

```diff
          line 34: 57
          line 35: 72
+         line 34: 78
          line 37: 92
```

Bytecode instructions at offset 78 correspond to the following
exception handler generated for the `case` at line 34:

```
        78: astore_1
        79: new           jacoco#24                 // class java/lang/MatchException
        82: dup
        83: aload_1
        84: invokevirtual jacoco#26                 // Method java/lang/Throwable.toString:()Ljava/lang/String;
        87: aload_1
        88: invokespecial jacoco#30                 // Method java/lang/MatchException."<init>":(Ljava/lang/String;Ljava/lang/Throwable;)V
        91: athrow
```
@Godin Godin added this to the 0.8.9 milestone Mar 31, 2023
@Godin Godin self-assigned this Mar 31, 2023
@Godin Godin added this to Implementation in Current work items via automation Mar 31, 2023
@Godin Godin marked this pull request as ready for review March 31, 2023 14:04
@Godin Godin requested a review from marchof March 31, 2023 14:04
@Godin
Copy link
Member Author

Godin commented Mar 31, 2023

@marchof note that I updated JDK21_URL in AzurePipelines and it now points to OpenJDK EA b16 - that's why this PR is green, and so without change-back or merge of this PR other further builds will be red.

@Godin Godin moved this from Implementation to Review in Current work items Mar 31, 2023
@marchof marchof merged commit c561c13 into jacoco:master Mar 31, 2023
21 checks passed
Current work items automation moved this from Review to Done Mar 31, 2023
@Godin Godin deleted the jep432_record_patterns branch March 31, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants