A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4175 below:

[java] ImmutableField - deprecate property `ignoredAnnotations` · Issue #4175 · pmd/pmd · GitHub

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4