JDK-8309054 : Parsing of erroneous patterns succeeds
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-29
  • Updated: 2023-06-05
  • Resolved: 2023-05-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b25Fixed
Related Reports
Relates :  
Description
        boolean t1 = switch (obj) {
            case Long a[] -> true;
            default -> false;
        };
        boolean t2 = switch (obj) {
            case Double a[][][][] -> true;
                default -> false;
        };
        if (obj instanceof Float a[][]) {
        }
        if (obj instanceof Integer a = Integer.valueOf(0)) {
        }
Comments
Changeset: 4f3a95af Author: Aggelos Biboudis <abimpoudis@openjdk.org> Committer: Jan Lahoda <jlahoda@openjdk.org> Date: 2023-05-31 09:37:58 +0000 URL: https://git.openjdk.org/jdk/commit/4f3a95af2f87756c87fa63d197176cfbb066ecdb
31-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14205 Date: 2023-05-29 15:53:48 +0000
29-05-2023