You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Andy Gumbrecht (JIRA)" <ji...@apache.org> on 2014/06/17 15:53:02 UTC

[jira] [Resolved] (OPENEJB-1081) Find most specific setter in ClientInjectionProcessor.findSetter

     [ https://issues.apache.org/jira/browse/OPENEJB-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Gumbrecht resolved OPENEJB-1081.
-------------------------------------

    Resolution: Not a Problem

Should no longer be a problem but will re-open if a test case is provided showing that there is an issue.

> Find most specific setter in ClientInjectionProcessor.findSetter
> ----------------------------------------------------------------
>
>                 Key: OPENEJB-1081
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1081
>             Project: OpenEJB
>          Issue Type: Improvement
>            Reporter: Quintin Beukes
>            Priority: Trivial
>             Fix For: 4.7.0
>
>         Attachments: findSetter.patch
>
>
> The findSetter method doesn't currently return the most specific
> setter. If you were for instance to try inject a String field called
> "myString", and you have 2 methods:
> void setMyString(Object)
> and
> void setMyString(String)
> OpenEJB would use the first it finds, instead of the most specific.
> This path adds the most specific injector functionality. It will prefer the exact class, and if not available prefer the class lowest down (closest to) the property to be injected's class.
> So if you were to inject an IllegalArgumentException, the preference would be as follows: IllegalArgumentException, RuntimeException, Exception, Throwable, Serializable, Object, but NumberFormatException won't be chosen.



--
This message was sent by Atlassian JIRA
(v6.2#6252)