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

Summary: "Import statics" creates ambiguous imports and thus compile errors
Product: java Reporter: kdureidy
Component: HintsAssignee: Svata Dedic <sdedic>
Status: REOPENED ---    
Severity: normal CC: markiewb, mmirilovic
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Shows the issue

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