Skip to content

java 14 switch expression syntax is not supported #7992

@koppor

Description

@koppor

Refs #7969 and #7103

JDK 14 has been released. It supports advanced switch statements

static void howMany(int k) {
    switch (k) {
        case 1  -> System.out.println("one");
        case 2  -> System.out.println("two");
        default -> System.out.println("many");
    }
}

When checkstyle encounters such code, it just cannot parse the file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions