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

Bug 533890

Summary: Static import of nested class requires super classes of enclosing to be on the classpath
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 4.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
test projects none

Description Stephan Herrmann CLA 2018-04-20 16:24:46 EDT
Created attachment 273716 [details]
test projects

Asked in https://stackoverflow.com/questions/49859548/java-import-static-fails-when-imported-class-extends-3rd-party-lib

Projects for reproduction attached.

Resolving a static import referencing a nested class walks up the super class chain, and if any super class cannot be found it complains "The type AbstractExternal cannot be resolved. It is indirectly referenced from required .class files."

This happens, because we first look for methods in all superclasses, and try nested classes only later, but then we already reported the dreaded isClasspathCorrect().
Comment 1 Eclipse Genie CLA 2020-05-04 13:45:24 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.