Skip to content

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 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.

@marchof marchof merged commit c561c13 into jacoco:master 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

2 participants