Skip to content

Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: DeclarationOrder #15065

@mahfouz72

Description

@mahfouz72

child #14942
I have read check documentation: https://checkstyle.org/checks/coding/declarationorder.html


According to Code Conventions for the Java Programming Language , the parts of a class or interface declaration should appear in the following order:

Class (static) variables. First the public class variables, then protected, then package level (no access modifier), and then private.
Instance variables. First the public class variables, then protected, then package level (no access modifier), and then private.
Constructors
Methods

unnamed variables can't be class fields. and unnamed pattern variable and unnamed patterns is part of a relational expression (if or case). we can close this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions