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 243769 - Implement overridden method across two projects/jars doesn't cause error, but override hints get confused.
Summary: Implement overridden method across two projects/jars doesn't cause error, but...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 13:39 UTC by Geoff_C
Modified: 2016-07-07 07:17 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 Geoff_C 2014-04-11 13:39:30 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

I import a 3rd party library into Project A and then override an abstract class in that jar, OriginalAbstractClass as AbstractClassA, but leave an abstract method from OriginalAbstractClass as abstract.

In a second project I import the first project, and provide a concrete class that overrides AbstractClassA as ConcreteClass.

Nothing informs me that ConcreteClass needs an implementation of the abstract method. Insert Code offers no options for doing so.

If I do create the method in ConcreteClass I can compile and run as long as I leave the override annotation off. The editor complains that the method is not an override if I annotate it.

If I put the signature for the abstract method in AbstractClassA then the editor will hint that it needs to be overridden, allows it to be inserted, but will complain about the annotation. If I remove the annotation it will hint that it needs to be restored.

Including the source library in my second project made the problem disappear.

I wonder if there are some rules about these sorts of things, and whether the editor hinting could be adusted to clarify the issues.
Comment 1 Martin Balin 2016-07-07 07:17:12 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss