This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262577 - Support for multiple static imports for the same method name
Summary: Support for multiple static imports for the same method name
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-26 05:04 UTC by _ gtzabari
Modified: 2016-06-26 05:04 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2016-06-26 05:04:17 UTC
Sometimes one needs to statically import the same method name from multiple classes. For example, assertj expects one to statically import assertThat() from the core and guava classes simultaneously: https://github.com/joel-costigliola/assertj-core/issues/682

Expected behavior:

1. User has already statically imported assertThat() from assertj core.
2. Current file references "assertThat(multimap).hasSameEntries()" which can only be resolved using guava's assertThat().
3. User invokes Fix Imports.
4. Netbeans offer to statically import the guava assertThat().
5. User accepts.
6. Compiler error goes away.

This issue may be related to #71249 and #124283.