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 171191 - Cast hint can rewrite explicit cast
Summary: Cast hint can rewrite explicit cast
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2009-08-31 16:15 UTC by Jiri Prox
Modified: 2013-09-02 14:20 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2009-08-31 16:15:02 UTC
Product Version: NetBeans IDE Dev (Build 200908300201)
Java: 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02
System: Linux version 2.6.24-23-generic running on i386; UTF-8; en_US (nb)

When the statement which will be casted by hint already starts with explicits casting, the can rewrite existing cast to
the new one.

Here is example:
1) have a code:
    public Number x() {
        return (List)null;

the hint will produce:
   return (Number)(List) null;

but is is enough to rewrite is like this:

   return (Number) null;