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.
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".
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.
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.
Version: 'Dev' -> 3.2
Fixed in release 3.2 & dev trunk.
[release32-20] Verified
Target milestone -> 3.2
Resolved for 3.4.x or earlier, no new info since then -> closing.