Skip to content

Enable Error Prone check: HidingField#12724

Merged
findepi merged 1 commit intotrinodb:masterfrom
ksobolew:kudi/enable-error-prone-hiding-field
Jun 7, 2022
Merged

Enable Error Prone check: HidingField#12724
findepi merged 1 commit intotrinodb:masterfrom
ksobolew:kudi/enable-error-prone-hiding-field

Conversation

@ksobolew
Copy link
Copy Markdown
Contributor

@ksobolew ksobolew commented Jun 7, 2022

Description

This warning (now error) triggers when a subclass declares a field with the same name as a non-private (i.e. visible) field in a superclass. Usually this is a simple matter of redundancy, but there's one case where the field in superclass is actually not useful - it is only used in subclasses, and the assignment is trivial, so it's better declared in them instead.

Is this change a fix, improvement, new feature, refactoring, or other?

Static analysis improvement.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

All over.

How would you describe this change to a non-technical end user or system administrator?

It improves code quality.

Related issues, pull requests, and links

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

This warning (now error) triggers when a subclass declares a field with
the same name as a non-private (i.e. visible) field in a superclass.
Usually this is a simple matter of redundancy, but there's one case
where the field in superclass is actually not useful - it is only used
in subclasses, and the assignment is trivial, so it's better declared in
them instead.
@cla-bot cla-bot bot added the cla-signed label Jun 7, 2022
@ksobolew ksobolew requested review from findepi, hashhar and kokosing June 7, 2022 13:28
@findepi findepi merged commit 5d939cb into trinodb:master Jun 7, 2022
@github-actions github-actions bot added this to the 385 milestone Jun 7, 2022
@ksobolew ksobolew deleted the kudi/enable-error-prone-hiding-field branch June 8, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants