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 0AF542004CA for ; Wed, 11 May 2016 15:52:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0974B1607AA; Wed, 11 May 2016 13:52:35 +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 522961601D4 for ; Wed, 11 May 2016 15:52:34 +0200 (CEST) Received: (qmail 39899 invoked by uid 500); 11 May 2016 13:52:33 -0000 Mailing-List: contact dev-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 dev@felix.apache.org Received: (qmail 39882 invoked by uid 99); 11 May 2016 13:52:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2016 13:52:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A8D22C34EF for ; Wed, 11 May 2016 13:52:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.28 X-Spam-Level: X-Spam-Status: No, score=0.28 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id jiCiLPKrwrVK for ; Wed, 11 May 2016 13:52:30 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 3B88F5F24C for ; Wed, 11 May 2016 13:52:29 +0000 (UTC) Received: from mfilter30-d.gandi.net (mfilter30-d.gandi.net [217.70.178.161]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id C8B2EA8113 for ; Wed, 11 May 2016 15:52:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter30-d.gandi.net Received: from relay3-d.mail.gandi.net ([IPv6:::ffff:217.70.183.195]) by mfilter30-d.gandi.net (mfilter30-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id OODA6zgJo2Cl for ; Wed, 11 May 2016 15:52:21 +0200 (CEST) X-Originating-IP: 50.67.192.4 Received: from [10.100.2.37] (S010600180a0ffbd9.vc.shawcable.net [50.67.192.4]) (Authenticated sender: jb@nanthrax.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 43AD2A80C8 for ; Wed, 11 May 2016 15:52:20 +0200 (CEST) Subject: Re: Some ideas for improvements in resolver To: dev@felix.apache.org References: <5732E452.8040008@die-schneider.net> From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: <57333913.6020205@nanthrax.net> Date: Wed, 11 May 2016 15:52:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <5732E452.8040008@die-schneider.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit archived-at: Wed, 11 May 2016 13:52:35 -0000 Hi Christian, About 1/, the spec classes will be embedded in the resolver bundle anyway ? +1 to upgrade to Java 6. +0 on removing the generic Util class. +0 about ResolveSession and move Blame, PermutationType, etc there. I'm not sure it will actually reduce the "global" weight (just moving code from ResolverImpl to ResolveSession. Regards JB On 05/11/2016 09:50 AM, Christian Schneider wrote: > Thomas asked me to look into the current code in resolver after his > improvements. > > I found some spots that could be improved: > > - We currently have a copy of the resolver spec sources inside the code. > I propose to refer to the spec bundle instead and embed the classes from > there. This protects against accidental changes in the spec sources. The > only caveat is that there is a difference in the bugfix version of the > spec but I think this is not a problem. > > org.osgi > org.osgi.service.resolver > 1.0.1 > > - I get some errors inside eclipse in CopyOnWriteListIterator. The > reason is that it uses @Override on methods from an interface while the > source level is at Java 5 which does not support this. So we can either > use java 6 or remove the @Override annotations there. I propose to > upgrade to Java 6. > - Avoid the generic Util class. We can split it into ResourceUtil and > RequirementUtil which would both host about half of the methods. > - Extract Consistency checks from ResolverImpl into a class > ConsistencyChecker like proposed in > https://issues.apache.org/jira/browse/FELIX-4848 . I have to validate > that this still works with the new code but I think it should. > - Extract ResolveSession and move Blame, PermutationType and UsedBlames > inside ResolveSession. This takes a bit of weight out of ResolverImpl > and also makes the cycle between ResolveSession and Capabilities smaller > thought it does not fully remove it > > I first would like to get some general feedback about the proposed > changes. I will then create jiras and pull requests for the ones that > the community is positve about. > > Christian > > -- Jean-Baptiste Onofré jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com