Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 533592

Summary: A severity 1 error (some variable cannot be resolved) is blocking two severity 2 (unused imports) from being reported.
Product: [Eclipse Project] JDT Reporter: brook hong <hzgmaxwell>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: stephan.herrmann
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug

Description brook hong CLA 2018-04-15 23:11:55 EDT
The issue was first reported here, https://github.com/eclipse/eclipse.jdt.ls/issues/621

After my investigation, it turns out that the problem might be caused by eclipse.jdt.core.

Test steps:

1. clone https://github.com/brookhong/TestUnusedImports
2. import the project into eclipse
3. open file src/main/java/HelloLog4j.java, you'll see only one error(log cannot be resolved) detected.
4. comment out line 12, then you could find the warnings for unused imports of java.util.*.
Comment 1 Eclipse Genie CLA 2020-05-09 18:37:52 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Stephan Herrmann CLA 2020-05-10 06:34:10 EDT
This is by design: as long as resolve errors are present, unused imports warning would in general not be reliable. So it's better to focus on definite and more severe errors first.