felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre De Rop (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-5244) Can't inject service using a method ref on a parent class method.
Date Wed, 27 Apr 2016 20:19:13 GMT
Pierre De Rop created FELIX-5244:
------------------------------------

             Summary: Can't inject service using a method ref on a parent class method.
                 Key: FELIX-5244
                 URL: https://issues.apache.org/jira/browse/FELIX-5244
             Project: Felix
          Issue Type: Bug
          Components: Dependency Manager Lambda
    Affects Versions: org.apache.felix.dependencymanager-r8
            Reporter: Pierre De Rop
            Assignee: Pierre De Rop
             Fix For: org.apache.felix.dependencymanager-r9


With DM lambda, you can't inject a service using a method reference on a bind method which
is inherited from a parent class.

For example, using the following classes:

{code}
    interface MyDependency {}
    
    class AbstractService {
         void bind(MyDependency myDependency) {
    	 }
    }
    
    class MyService extends AbstractService {
    }    
{code}

then the following does not work:

{code}
component(comp -> comp
    .impl(MyService.class)
    .withSvc(MyDependency.class, svc -> svc.add(AbstractService::bind)));
{code}
 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message