Skip to content

[GCI82] False positive with Java records #104

@fredng06

Description

@fredng06

Describe the bug

By design record's attributes are implicitly final although final keyword is not allowed in the record declaration. Hence GCI82 rules still finds an issue on record declaration.

To Reproduce

Declare a java record and analyse the code with creedengo plugin.

public record TestRecord(String name, int age) {}

Expected behavior

The record declaration should be compliant and no issue should be raised.

Screenshots

Image

Software Versions

  • SonarQube Version: Community Build v25.3.0.104237
  • Plugin Version: 2.1.1

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    💉 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions