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 237701 - "Import statics" creates ambiguous imports and thus compile errors
Summary: "Import statics" creates ambiguous imports and thus compile errors
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2013-10-27 12:35 UTC by kdureidy
Modified: 2016-07-10 17:05 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Shows the issue (57.14 KB, image/png)
2016-07-10 17:04 UTC, markiewb

Note You need to log in before you can comment on or make changes to this bug.
Description kdureidy 2013-10-27 12:35:23 UTC
Steps to reproduce:

1- Create a new Java class 
2- add some valid code that compiles correctly thats contains String.valueOf() and Boolean.valueOf()
3- do Inspect and Transform, and choose static import

For methods such as 

Static import will cause lots of issues, and the editor will not detect any of these errors until you do build project.
Comment 1 Svata Dedic 2013-11-15 08:31:40 UTC
Not enough time to solve in patch1, sorry
Comment 2 Martin Balin 2016-07-07 07:16:44 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 3 markiewb 2016-07-10 17:04:41 UTC
Created attachment 160331 [details]
Shows the issue
Comment 4 markiewb 2016-07-10 17:05:18 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)

The hint creates ambiguous imports. See screenshot