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 212125

Summary: Don't complain about java.lang import if another type with the same name is in scope
Product: java Reporter: pepijn <pepijn>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description pepijn 2012-05-05 14:12:06 UTC
The hinter for java.lang imports should take into account whether the import is legitimate, because there is a clash with a type of the same name from another star import. For instance, I have a file with among others the following imports:

import java.lang.Void;
import org.pepsoft.worldpainter.layers.*;

The layers package also contains a class named Void, but in this class I only use java.lang.Void. Unless I want to use the fully qualified name every time, I have to explicitly import java.lang.Void, otherwise the compiler picks the one from the layers package. In my opinion this is a legitimate import, so it would be nice if the hinter would take this into account, if feasible.