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

Commits on Mar 31, 2023

  1. Fix validation test for Java 21

    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 committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    22db19b View commit details
    Browse the repository at this point in the history