Return-Path: X-Original-To: apmail-felix-commits-archive@www.apache.org Delivered-To: apmail-felix-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF4D1182FC for ; Mon, 12 Oct 2015 16:27:12 +0000 (UTC) Received: (qmail 16274 invoked by uid 500); 12 Oct 2015 16:27:12 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 16204 invoked by uid 500); 12 Oct 2015 16:27:12 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 16194 invoked by uid 99); 12 Oct 2015 16:27:12 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2015 16:27:12 +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 498E5180A66 for ; Mon, 12 Oct 2015 16:27:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.99 X-Spam-Level: X-Spam-Status: No, score=0.99 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5-hUKIV912AX for ; Mon, 12 Oct 2015 16:27:11 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id D632A2565D for ; Mon, 12 Oct 2015 16:27:10 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F3D54E04C4 for ; Mon, 12 Oct 2015 16:27:09 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 57B113A024F for ; Mon, 12 Oct 2015 16:27:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1708156 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java Date: Mon, 12 Oct 2015 16:27:08 -0000 To: commits@felix.apache.org From: davidb@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151012162709.57B113A024F@svn01-us-west.apache.org> Author: davidb Date: Mon Oct 12 16:27:08 2015 New Revision: 1708156 URL: http://svn.apache.org/viewvc?rev=1708156&view=rev Log: FELIX-5075 Framework hooks not re-sorted on service ranking update Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java?rev=1708156&r1=1708155&r2=1708156&view=diff ============================================================================== --- felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java (original) +++ felix/trunk/framework/src/main/java/org/apache/felix/framework/HookRegistry.java Mon Oct 12 16:27:08 2015 @@ -159,8 +159,12 @@ public class HookRegistry SortedSet> hooks = m_allHooks.get(serviceName); if (hooks != null) { - hooks = new TreeSet>(hooks); - m_allHooks.put(serviceName, hooks); + TreeSet> newHooks = new TreeSet>(Collections.reverseOrder()); + for (ServiceReference hook : hooks) { + newHooks.add(hook); // addAll() does not re-sort + } + + m_allHooks.put(serviceName, newHooks); } } }