eclipse-jdt / eclipse-jdt/eclipse.jdt.core

False positive "The static method X from the type Y should be accessed directly"

Open
#813 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Assume the following code: [test.access.staticprotected.zip](https://github.com/eclipse-jdt/eclipse.jdt.core/files/10888888/test.access.staticprotected.zip)

We now change the class like this and get a warning:
![grafik](https://user-images.githubusercontent.com/1331477/223666148-bd73cdf2-e4b1-4040-8eb5-f4e282e9eee9.png)

This is a false-positive because the recommended "direct" access is actually not accessible:
![grafik](https://user-images.githubusercontent.com/1331477/223666570-58f44d70-dca0-42ec-a8ef-6e3ca4891fd0.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.