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 - Don't complain about java.lang import if another type with the same name is in scope
Summary: Don't complain about java.lang import if another type with the same name is i...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1.2
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-05 14:12 UTC by pepijn
Modified: 2013-09-02 14:23 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 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.