United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6210265 EventHandler should not cache Method
JDK-6210265 : EventHandler should not cache Method

Details
Type:
Bug
Submit Date:
2004-12-17
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2005-01-15
Component:
client-libs
OS:
linux_redhat_9.0
Sub-Component:
java.beans
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports

Sub Tasks

Description
EventHandler currently caches the Method of the target.  This is problematic for the following reasons:

EventHandlers are typically attached to ui components that notify the listener based on a user gesture.  Because they're driven from user interaction EventHandler's are sporadically notified.  As such, caching the Method adds unneeded overhead to applications.

If we cache the method, and we get the wrong method there can be problems if we can later find the right method.  This would likely only happen with method overloading, and an exception will be thrown, but it's still possible.

###@###.### 2004-12-17 22:52:38 GMT

                                    

Comments
EVALUATION

Yes, this makes sense.
One other thing to mention is that EventHandler is indirectly using a cache provided by ReflectionUtils, so that it doesn't make sense for EventHandler to also cache the field.
Additionally the unused class field, empty, will be removed.
###@###.### 2004-12-17 23:27:42 GMT
###@###.### 2004-12-17 23:35:28 GMT
                                     
2004-12-17



Hardware and Software, Engineered to Work Together