[
https://issues.apache.org/jira/browse/SLING-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113945#comment-14113945
]
ASF GitHub Bot commented on SLING-3892:
---------------------------------------
GitHub user kwin opened a pull request:
https://github.com/apache/sling/pull/26
SLING-3892
use ServiceReference in the map as a key to expose multiple
adapterFactories registered through the same service
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kwin/sling
SLING-3892-support-multiple-adapter-factories-from-the-same-service
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/26.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #26
----
commit 22475ad5910d5057415e214b2dffeb5b155afacb
Author: Konrad Windszus <[email protected]>
Date: 2014-08-28T16:43:42Z
SLING-3892, use ServiceReference in the map as a key to expose multiple
adapterFactories registered through the same service
----
> AdapterWebConsolePlugin does not expose all AdapterFactories
> ------------------------------------------------------------
>
> Key: SLING-3892
> URL: https://issues.apache.org/jira/browse/SLING-3892
> Project: Sling
> Issue Type: Bug
> Affects Versions: Adapter 2.1.0
> Reporter: Konrad Windszus
> Priority: Critical
>
> The AdapterWebConsolePlugin does not expose all AdapterFactories because it
> relies on on a Map which uses the service as the key instead of the
> ServiceReference
> (https://github.com/apache/sling/blob/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterWebConsolePlugin.java#L110).
> That is a problem for all adapters being registered through Sling Models
> because that is reusing the same service instance for registering all
> adapterFactories
> (https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelPackageBundleListener.java#L100).
> Please change that map so that the reference acts as key instead of the
> service itself. Otherwise each time the {{addServiceMetadata}} is called, it
> will overwrite the previous AdaptableDescription.
--
This message was sent by Atlassian JIRA
(v6.2#6252)