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 27911 - Remove WeakListener innerclasses from API
Summary: Remove WeakListener innerclasses from API
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@platform
Depends on:
Blocks: 19443
  Show dependency tree
Reported: 2002-10-10 12:34 UTC by Jaroslav Tulach
Modified: 2008-12-22 23:42 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-10-10 12:34:46 UTC
They are deprecated for long time and replaced by
appropriate factory methods in WeakListener. Let's
remove them. 

I think there is a need to rewrite something in
filesystems, because they seem to use on of the
subclasses of the WeakListener, probably possible
to directly subclass WeakListener itself.
Comment 1 Jesse Glick 2002-10-10 13:10:10 UTC
The subclassing is quite unnecessary, could use e.g. WeakSet instead.
Comment 2 Jesse Glick 2002-10-21 21:20:52 UTC
More serious is how to remove the specific factory methods and use
create() uniformly. We can get rid of static inner classes, but not
methods. operation() for example, which will make it impossible to
delete org.openide.loaders from the APIs. The only solution I can
think of is to move all of WeakListener to openide-deprecated.jar, and
create a copy of the class with a different name that would contain
only the general create() method.
Comment 3 Jaroslav Tulach 2002-10-29 15:38:34 UTC
Use bytecode patching. Create WeakListenerPatch with all methods that
you want to remove from WeakListener and during Nb runtime change
WeakListener's superclass. I thought this works just for non static
methods but it seems to work also for static ones. Surprise, surprise.

I suggest to go that way.

Comment 4 Jaroslav Tulach 2003-09-09 15:38:42 UTC
WeakListener made deprecated and replaced by WeakListeners factory
class without innerclasses.