Bug 475444 - static import of members should work if the member is defined in a super class
Summary: static import of members should work if the member is defined in a super class
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 02:59 EDT by Christian Schwarz CLA
Modified: 2021-10-12 07:22 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Schwarz CLA 2015-08-20 02:59:03 EDT
Currently it is not possible to make a static import if a static member is defined in a super class.

Here is a real world example:


class org.mockito.Matchers {
 public static String anyString(){..}
}

class org.mockito.Mockito extends org.mockito.Matchers {
}


It is not possible to do a static import of Mockito.anyString(), it is only possible if the declaring type of #anyString() is referenced -> Matchers.anyString().