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 246994 - "Boxing of already boxed value" message is wrong
Summary: "Boxing of already boxed value" message is wrong
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-10 13:39 UTC by tln
Modified: 2014-09-25 03:15 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 tln 2014-09-10 13:39:08 UTC
public class BugDemo
{
	public static void setNumber(Integer value) {}
	public static void setNumber(Long value) {}
	
	public static void bug()
	{
		setNumber((Integer)null);   // (*)
	}
}

In this class NetBeans marks the line (*) with a warning bulb saying "Boxing of already boxed value". The recommended remedy is "Remove extra boxing". However, if I follow this advice, the code won't compile anymore. The compiler will complain "reference to setNumber is ambiguous" at this line.
Comment 1 Dusan Balek 2014-09-22 10:15:19 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/937a5f69e48d
Comment 2 Quality Engineering 2014-09-25 03:15:10 UTC
Integrated into 'main-silver', will be available in build *201409250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/937a5f69e48d
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #246994: "Boxing of already boxed value" message is wrong - fixed.