[picocontainer-scm] [jira] Created: (PICO-379) ReflectionLifecycleStrategy should support "null" methods
Grégory Joseph (JIRA) <jira-yCVjj/[email protected]> Wed, 19 Jan 2011 14:04:58 -0600 (CST)
| Newsgroups | gmane.comp.java.picocontainer.cvs |
|---|---|
| Message-ID | <13042155.29785.1295467498142.JavaMail.haus-jira@codehaus01.managed.contegix.com> |
ReflectionLifecycleStrategy should support "null" methods
---------------------------------------------------------
Key: PICO-379
URL: http://jira.codehaus.org/browse/PICO-379
Project: PicoContainer
Issue Type: Improvement
Components: PicoContainer (Java)
Environment: Affects 2.12, which is not available here.
Reporter: Grégory Joseph
Attachments: ReflectionLifecycleStrategy-support-null.patch
I want to support a legacy lifecycle pattern in our code where we only have one {{init()}} method, no stop/dispose methods. Ideally I guess I should be able to use this lifecycle strategy:
{{ new ReflectionLifecycleStrategy(componentMonitor, "init", null, null)}}
but this fails miserably with NPEs in java.lang.Class.
The attached patch allows this, thus keeping me from having to do
{{ new ReflectionLifecycleStrategy(componentMonitor, "init", "some-really-stupid-method-name-that-won't-exist", "some-really-stupid-method-name-that-won't-exist-either")}}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
<a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>