Skip to content

UnnecessaryModifier PMD warning in generated code (private constructor for enums) #1102

Closed

Description

@lasselindqvist

The tool generates code that causes PMD UnnecessaryModifier warnings for generated enums .
(https://pmd.github.io/latest/pmd_rules_java_codestyle.html#unnecessarymodifier)
It might make sense to change the autogenerated code not to have

    private SomeEnum(String value) {
        this.value = value;
    }

but

SomeEnum(String value) {
    this.value = value;
}

enum constructor definitions.

Activity

  1. added this to the 1.1.1 milestone on Apr 1, 2021
  2. added a commit that references this issue on Aug 8, 2024
    f878c67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions