JDK-6210265 : EventHandler should not cache Method
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_redhat_9.0
  • CPU: x86
  • Submitted: 2004-12-17
  • Updated: 2010-04-02
  • Resolved: 2005-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b20Fixed
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
17-12-2004