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

Organize Imports produces impossible imports

Open
#814 10 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)

Now I use "Organize Imports" on the class `TestMe` what results in a compile error:
![grafik](https://user-images.githubusercontent.com/1331477/223667125-1a3b7342-37da-444e-9a1a-c7e5dd62c8d1.png)

The correct import would be `import static test.access.staticprotected.ThisIsPublic.thisIsPublic`

![grafik](https://user-images.githubusercontent.com/1331477/223667424-6599c4b3-3ff2-4e7e-99ef-7ac83c8a94e8.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.