felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daan de Wit (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3812) constructor injection does not work for properties
Date Thu, 13 Dec 2012 07:45:21 GMT

    [ https://issues.apache.org/jira/browse/FELIX-3812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13530763#comment-13530763
] 

Daan de Wit commented on FELIX-3812:
------------------------------------

Getting parameter names at runtime actually is possible when the code is compiled with debug
information. That is how Spring works, they use ASM to get the information, so I think it's
not provided by the standard Java reflection classes.

I'm fine with using the name argument on the annotation though, it's just a minor inconvenience
having to type the names twice. 

But if the name argument is mandatory for constructor arguments, I think the error message
should state that clearly.
                
> constructor injection does not work for properties
> --------------------------------------------------
>
>                 Key: FELIX-3812
>                 URL: https://issues.apache.org/jira/browse/FELIX-3812
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-core-1.8.2, ipojo-core-1.8.4
>            Reporter: Daan de Wit
>            Assignee: Göktürk Gezer
>
> Constructor injection does not work for properties, iPOJO tries to find a constructor
that also has an InstanceManager-argument. 
> createInstance -> Cannot invoke the constructor (method not found) : package.ClassName.<init>(org.apache.felix.ipojo.InstanceManager,
null)
> java.lang.NoSuchMethodException: package.ClassName.<init>(org.apache.felix.ipojo.InstanceManager,
null)
> 	at java.lang.Class.getConstructor0(Class.java:2706)
> 	at java.lang.Class.getDeclaredConstructor(Class.java:1985)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message