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 9670 - WeakListener catches NoSuchMethodException probably gratuitously
Summary: WeakListener catches NoSuchMethodException probably gratuitously
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: anovak
URL:
Keywords:
Depends on: 9802
Blocks:
  Show dependency tree
 
Reported: 2001-02-18 22:13 UTC by Jesse Glick
Modified: 2008-12-22 16:57 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 Jesse Glick 2001-02-18 22:13:46 UTC
WeakListener tries to look up a remove method for listeners on the source object
using reflection. It expects to find one because there was an add method, or it
would not be being used. At one time, NoSuchMethodException's were getting
printed on console regularly, and so someone (Ales I think?) commented out the
stack trace.

It seems the reason these were getting thrown to begin with was that the code to
look up the method is wrong: it does not look for remove methods defined in
superclasses and not overridden, which is perfectly legitimate. Probably if the
method search was fixed, the stack trace could be printed again because it would
really be an unexpected condition, and also a small memory leak would be
resolved.
Comment 1 anovak 2001-02-19 10:15:40 UTC
I agree.
Comment 2 anovak 2001-02-23 09:02:52 UTC
Fixed in main trunk
Comment 3 anovak 2001-02-23 12:43:58 UTC
Utilties.errManager() returns null so it prints out exceptions.
I temporarily remove my modification.
Comment 4 anovak 2001-02-27 12:04:26 UTC
Fixed so that you need to have logging level 0 for org.openide.util to be able
to see the exception. Otherwise it prints out exceptions in an EE version and
that breaks the build.
Comment 5 Quality Engineering 2003-07-01 15:55:09 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 6 Quality Engineering 2003-07-01 16:13:52 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.