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 58370 - [override methods] exceptions thrown after select 'Show abstract methods only'
Summary: [override methods] exceptions thrown after select 'Show abstract methods only'
Status: CLOSED DUPLICATE of bug 57769
Alias: None
Product: platform
Classification: Unclassified
Component: Nodes (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords: REGRESSION
: 59480 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-27 11:22 UTC by ehucka
Modified: 2008-12-22 23:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exceptions' stacktraces (21.00 KB, text/plain)
2005-04-27 11:24 UTC, ehucka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ehucka 2005-04-27 11:22:41 UTC
RC2 build: 200504261930

I have a class which inherites from some abstract class and interfaces. 
Steps to reproduce:
1. open a source file of the class and invoke Override methods action 
2. select "Show superclasses and interfaces" checkbox
3. select 'Show abstract methods only' checkbox

Result: many exceptions were thrown into ide.log, the dialog shows non-abstract
methods too.
Comment 1 ehucka 2005-04-27 11:24:07 UTC
Created attachment 21892 [details]
exceptions' stacktraces
Comment 2 Martin Matula 2005-04-27 12:19:10 UTC
Weird - their is nothing from java modules on the stacktrace. Dan, please evaluate.
Comment 3 Tomas Hurka 2005-04-27 17:19:00 UTC
BTW: If this is a regression, which build works OK?
Comment 4 ehucka 2005-04-28 10:46:03 UTC
probably since 20050413 but i found it is not so easy to reproduce
Comment 5 Daniel Prusa 2005-04-29 11:32:32 UTC
I have found a reliable way how to reproduce the problem:

1) Create a simple class that extends java.util.AbstractList and implements
java.util.Iterator
2) Invoke "Override Methods" action on the class.
3) Check "Show Superclasses and Interfaces".
4) Check "Show Abstract Methods Only".

The exceptions attached above are always thrown.
It is true that the dialog shows non-abstract methods by this stage, but it is a
consequence of the exceptions. If "Show Abstract methods Only" is unchecked and
checked again, there are only abstract methods.

Seems like a problem with nodes, reassigning to openide for further evaluation.

Comment 6 Petr Nejedly 2005-05-05 09:49:23 UTC
Reproduced the problem, investigating.
Problem either in nodes or in explorer.
Comment 7 Petr Nejedly 2005-05-05 14:50:36 UTC
I have a "fix" that workarounds the exception in the visualization code (prevent
VisualizerChidren from generating inconsistent VisualizerEvents) but some
strange incomming data are causing the problem in the first place. I'll keep
investigating.
Comment 8 Petr Nejedly 2005-05-05 16:09:53 UTC
What happens:
Let's look at the java.lang.Object Node for the original scenario.
It has two methods, "clone()" and "finalize()", and they should be both removed
once the user switches to the "abstract only" mode.
VisualizerChildren.remove() is called with remList containing (ID hashcodes)
[MethodNode@b24c03, MethodNode@1d09ad6], while the children currently holds
visualizers for [MethodNode@116b52c, MethodNode@1d09ad6]. That is, there are
three different node instances, [A,B], [C,B]

The nodes themself are equals() if they represent the same element (an
unfortunate feature of ElementNode), so that A.equals(C) == true.

All in all, it seems it is a consequence of issue 57769

*** This issue has been marked as a duplicate of 57769 ***
Comment 9 Petr Nejedly 2005-06-01 13:48:21 UTC
*** Issue 59480 has been marked as a duplicate of this issue. ***
Comment 10 Marian Mirilovic 2005-07-14 15:58:20 UTC
verified duplicate