Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B9CE6200D69 for ; Tue, 12 Dec 2017 13:19:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B5553160BE7; Tue, 12 Dec 2017 12:19:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 10B1A160C0F for ; Tue, 12 Dec 2017 13:19:10 +0100 (CET) Received: (qmail 81508 invoked by uid 500); 12 Dec 2017 12:19:10 -0000 Mailing-List: contact dev-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list dev@sling.apache.org Received: (qmail 81488 invoked by uid 99); 12 Dec 2017 12:19:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2017 12:19:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9EA5E1806E9 for ; Tue, 12 Dec 2017 12:19:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 01or48snzUva for ; Tue, 12 Dec 2017 12:19:08 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1C71F5F24A for ; Tue, 12 Dec 2017 12:19:08 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5102AE0D73 for ; Tue, 12 Dec 2017 12:19:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E9368212FA for ; Tue, 12 Dec 2017 12:19:01 +0000 (UTC) Date: Tue, 12 Dec 2017 12:19:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@sling.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SLING-7194) Document that AdapterManager sorts AdapterFactory implementations lowest ranking first MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 12 Dec 2017 12:19:11 -0000 [ https://issues.apache.org/jira/browse/SLING-7194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16287522#comment-16287522 ] ASF GitHub Bot commented on SLING-7194: --------------------------------------- stefanseifert closed pull request #1: SLING-7194 AdapterManager sorts AdapterFactory implementations lowest ranking first URL: https://github.com/apache/sling-org-apache-sling-adapter/pull/1 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Document that AdapterManager sorts AdapterFactory implementations lowest ranking first > -------------------------------------------------------------------------------------- > > Key: SLING-7194 > URL: https://issues.apache.org/jira/browse/SLING-7194 > Project: Sling > Issue Type: Task > Components: Extensions > Affects Versions: API 2.16.4 > Reporter: Stefan Seifert > Assignee: Stefan Seifert > Priority: Minor > Fix For: API 2.16.6 > > > the current implementation of AdapterManager uses a AdapterFactoryDescriptorMap to sort the AdapterFactory implementations found. > this is done using a TreeMap with the ServiceReference as key. ServiceReference implements a compareTo. > according to its documentation the default implementation sorts with service-ranking lowest-first/service id highest-first: > https://osgi.org/javadoc/r6/core/org/osgi/framework/ServiceReference.html#compareTo(java.lang.Object) > when picking a service from multiple ones using BundleContext.getService, the service with hightest service ranking/lowest service id is returned. > i would expect the same from the AdapterManager implementation - if multiple implementations match pick that one with highest ranking/lowest service id. -- This message was sent by Atlassian JIRA (v6.4.14#64029)