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 218550 - [73cat] Map replaceable with EnumMap should consider target type
Summary: [73cat] Map replaceable with EnumMap should consider target type
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 222044 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-18 13:57 UTC by misterm
Modified: 2013-06-18 14:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2012-09-18 13:57:48 UTC
I have:

return new TreeMap<SomeEnum, X>();

for a method that returns SortedMap<SomeEnum,X>. The hint isn't applicable to this context.


Product Version = NetBeans IDE Dev (Build 20120914-1d2f1a14b692)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_01
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.1-b02
Comment 1 Jan Lahoda 2012-11-13 13:54:28 UTC
*** Bug 222044 has been marked as a duplicate of this bug. ***
Comment 2 Quality Engineering 2013-06-18 14:48:21 UTC
Integrated into 'main-golden', will be available in build *201306181109* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/69ebbcdb8dc7
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #218550: prevent the "use EnumMap" hint if EnumMap is not assignable to the target type.
Comment 3 Jan Lahoda 2013-06-18 14:58:05 UTC
Fixed by the above changeset.