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.
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.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/937a5f69e48d
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.