Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential error with child member hiding parent member #27

Closed
jbnas opened this issue Oct 5, 2018 · 1 comment
Closed

Potential error with child member hiding parent member #27

jbnas opened this issue Oct 5, 2018 · 1 comment

Comments

@jbnas
Copy link
Contributor

jbnas commented Oct 5, 2018

Have the following Eclipse warning:

The field FileDumpSink.formatter is hiding a field from type FileSink in: /tnt4j/src/main/java/com/jkoolcloud/tnt4j/dump/FileDumpSink.java line 36

I would think that child class wants to use member defined in parent class.

To see these types of warnings, need to set the following Eclipse preference to not ignore it (I set it to Warning):

Java=>Compiler=>Errors/Warnings: Name shadowing and conflicts=>Field declaration hides another field or variable

Probably a good idea if everyone set this to Warning, since in most cases this is unintended behavior.

@kausandr
Copy link
Contributor

kausandr commented Oct 8, 2018

field renamed to dumpFormatter

@kausandr kausandr closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants