GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] ImmutableField - deprecate property `ignoredAnnotations` · Issue #4175 · pmd/pmd

[java] ImmutableField - deprecate property ignoredAnnotations #4175

New issue
Copy link
New issue
Copy link
Closed
#4231
Closed
[java] ImmutableField - deprecate property ignoredAnnotations#4175
#4231
Copy link
Assignees
adangel
Labels
an:enhancementAn improvement on existing features / rulesis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
Milestone
6.52.0

Description

@adangel
adangel
opened on Oct 27, 2022
Issue body actions

The rule ImmutableField had a similar challenge like UnusedPrivateField had before #4100: It has a property ignoredAnnotations that we needed to update to consider all possible Java frameworks.

However with #4018 ImmutableField now

only considers fields, that are initialized once and never changed - either in the constructor or in the declaration.
If the field is not initialized at all (which is the typical case when a framework will set the value by reflection), the rule won't trigger now for such fields.

The property ignoredAnnotations is still there, but maybe it can be deprecated and eventually removed?

We can think for the next version about removing/deprecating the property ignoredAnnotations for this rule entirely. Not sure about the class-level lombok annotations though...

(#4018 (review))

Having less properties makes the rule easier to use and avoids confusion when this property is needed.

Activity

  1. adangel
    added
    an:enhancementAn improvement on existing features / rules
    is:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them
    on Oct 27, 2022
  2. adangel
    added this to the 6.52.0 milestone on Oct 27, 2022
  3. adangel
    self-assigned this
    on Nov 22, 2022
  4. adangel
    modified the milestone: 6.52.0 on Nov 24, 2022
  5. adangel
    added a commit that references this issue on Nov 24, 2022

    [java] ImmutableField - deprecate property ignoredAnnotations

    This issue will close once commit a28705a is merged into the 'main' branch.
    a28705a
  6. adangel commented on Nov 24, 2022

    @adangel
    adangel
    on Nov 24, 2022
    MemberAuthor
    More actions

    The only use case for this annotations was #1056. But I think, such special cases should be dealt with suppressing the cases.

  7. adangel
    closed this as completedin #4231on Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

an:enhancementAn improvement on existing features / rulesis:deprecationThe main focus is deprecating public APIs or rules, eg to make them internal, or removing them

Type

No type

Projects

No projects

    Milestone

    • 6.52.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.