[ 
https://issues.apache.org/jira/browse/OWB-340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12851533#action_12851533
 ] 

Gurkan Erdogdu commented on OWB-340:
------------------------------------

Specification says that BeanManager#createInjectionTarget returns 
implementation dependent InjectionTarget. Also specification at 11.2 says that 
InjectionTarget#produce create an instance of it regarding to using suitable 
Constructor. 

"produce() calls the constructor annotated @Inject if it exists, or the 
constructor with no parameters otherwise, as
defined in Section 5.5.1, "Injection using the bean constructor", and returns 
the resulting instance. If the class has interceptors,produce() is responsible 
for building the interceptors and decorators of the instance."

Therefore if there is no suitable constructor, currently it throws Exception. 
Therefore add default constructor solves issue.

> BeanManagerImpl.createInjectionTarget() Throws Exception When No Constructor 
> Found
> ----------------------------------------------------------------------------------
>
>                 Key: OWB-340
>                 URL: https://issues.apache.org/jira/browse/OWB-340
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: James Carman
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-340.patch
>
>
> Instead of throwing an exception, we should just return an InjectionTarget 
> object that returns an empty set of AnnotatedConstructors from 
> getConstructors().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to