[
https://issues.apache.org/jira/browse/DELTASPIKE-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13175348#comment-13175348
]
Gerhard Petracek commented on DELTASPIKE-20:
if you provide a name, type,... and there is no cdi bean for it the behaviour
is different.
optionalBeanAllowed == false cdiBeanFound == false - throw an exception
optionalBeanAllowed == true cdiBeanFound == false - return null
the alternative would be to return null and every caller has to do the
exception part (if a cdi bean isn't optional) - we will see different
exceptions for the same reason.
move util methods to CdiUtils
-
Key: DELTASPIKE-20
URL: https://issues.apache.org/jira/browse/DELTASPIKE-20
Project: DeltaSpike
Issue Type: Sub-task
Components: Core
Reporter: Gerhard Petracek
Assignee: Mark Struberg
public T T getContextualReference(ClassT type, boolean
optionalBeanAllowed, Annotation... qualifiers)
public T T getContextualReference(String name, boolean optionalBeanAllowed,
ClassT targetType)
public T T getContextualReference(BeanT bean, boolean
optionalBeanAllowed, ClassT targetType)
public T ListT getContextualReferences(ClassT type, boolean
optionalBeanAllowed, Annotation... qualifiers)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira