You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre De Rop (JIRA)" <ji...@apache.org> on 2016/03/06 20:06:40 UTC
[jira] [Closed] (FELIX-5146) Service adapters turn on autoconf even
if callbacks are used
[ https://issues.apache.org/jira/browse/FELIX-5146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre De Rop closed FELIX-5146.
--------------------------------
> Service adapters turn on autoconf even if callbacks are used
> ------------------------------------------------------------
>
> Key: FELIX-5146
> URL: https://issues.apache.org/jira/browse/FELIX-5146
> Project: Felix
> Issue Type: Bug
> Components: Dependency Manager
> Affects Versions: org.apache.felix.dependencymanager-r1
> Reporter: Pierre De Rop
> Assignee: Pierre De Rop
> Priority: Minor
> Fix For: org.apache.felix.dependencymanager-r8
>
>
> in the previous DM 3 version, when you specify a service adapter without an autoconfig field and with some callbacks (and with or without a callback instance object), then auto config mode (on fields in the adapter class) is turned off.
> This is good, because mixing callbacks and auto-config mode (on class fields) may lead to bugs difficult to diagnose.
> in dm4, there is a mistake: when you specify a service adapter without an autoconfig field, but with callbacks on a callback instance, like this for example:
> {code}
> ServiceAdapterCallbackInstance callbackInstance =
> new ServiceAdapterCallbackInstance(e);
> m.createAdapterService(OriginalService.class, null, null, /* no autoconfig field */,
> callbackInstance, "set", "changed","unset", null, true)
> {code}
> then the adapter class fields are auto-configured, even if no auto config class field have been specified and if some callbacks have been specified.
> We should go back to the previous DM 3 behavior, which makes more sense: if some callbacks are defined and there is no autoconfig field, then do not enable auto-config mode.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)