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 9927 - ClassElement.add* methods should handle duplicites
Summary: ClassElement.add* methods should handle duplicites
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-02 11:31 UTC by Martin Ryzl
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

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 Martin Ryzl 2001-03-02 11:31:54 UTC
For example, two subsequent calls of addInterface() with the same parameter 
creates invalid source code.
This is not specified in OpenAPI, but I mean that it should be and that the 
semantics  should be "add only once".
Comment 1 Svata Dedic 2001-03-04 14:00:55 UTC
To be consistent with the other add* methods on a ClassElement, attempt to add 
an interface identifier for the second time should throw SourceException. The 
same is already done for fields methods and constructors.
Comment 2 Martin Ryzl 2001-03-05 10:15:31 UTC
I understand that adding a field with the same name but another type or 
access modifier should
cause an exception. However, adding an interface cannot cause any problems and 
thus the "add at most once" is probably better semantics.
Comment 3 Jan Chalupa 2001-03-12 10:46:21 UTC
Version: 'Dev' -> 3.2
Comment 4 Svata Dedic 2001-03-21 16:21:56 UTC
Fixed in release 3.2 & dev trunk.
Comment 5 Jan Becicka 2001-04-04 16:48:28 UTC
[release32-20] Verified
Comment 6 Jan Chalupa 2001-05-05 23:24:31 UTC
Target milestone -> 3.2
Comment 7 Quality Engineering 2003-07-01 13:20:45 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.