From user-return-31343-archive-asf-public=cust-asf.ponee.io@commons.apache.org Tue Nov 13 06:37:48 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2F56918062B for ; Tue, 13 Nov 2018 06:37:47 +0100 (CET) Received: (qmail 34756 invoked by uid 500); 13 Nov 2018 05:37:44 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 34744 invoked by uid 99); 13 Nov 2018 05:37:44 -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; Tue, 13 Nov 2018 05:37:43 +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 8CBFECCBA3 for ; Tue, 13 Nov 2018 05:37:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.09 X-Spam-Level: ** X-Spam-Status: No, score=2.09 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-1.458, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_REPLY=1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id dJdILj4Jqhvl for ; Tue, 13 Nov 2018 05:37:41 +0000 (UTC) Received: from mail-it1-f169.google.com (mail-it1-f169.google.com [209.85.166.169]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D218462475 for ; Tue, 13 Nov 2018 05:37:40 +0000 (UTC) Received: by mail-it1-f169.google.com with SMTP id e11so16693226itl.5 for ; Mon, 12 Nov 2018 21:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=sxIPmWd2GhaJgKnx8RMQemLvrEwgZhB98vdrZ8/GNLE=; b=nqKnmuxsW4ns2C1CnRCcF0mMKDKkpq61IpCHfCnlsYKNJE5V42tL8l8F5mqWN/CYkH LJIi5VHMF+F+dvUUgDckmPexXALn4FVKx+qLHEqWw48tHiBtdc83mOYR8N2YV5PplIo4 7iOq8uc0x4LxXUm8qHU/C7UidWc64AUhO1KVkh6NUJudvQNn7xEd7dN5zLEGHNFTPQec q9NPjbkkUsLgq2EdTLBibUK3O3gl5auFJUnPfcqcSRf0Yz1lzRGV40Iv8xLxetr1u2Cx td+RzYJHMZhU8n3HAiKo6gyOno/P2xEjACzAE4Is0Ax5CgnACPszgIW8jRZsKVsQ9cJ4 rMuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=sxIPmWd2GhaJgKnx8RMQemLvrEwgZhB98vdrZ8/GNLE=; b=ROTJ7eOfQyBakOPpxEcm7U03kQx/shy+SSkdv1MLjEIZo336PS7T3uBm7GHfNkOxTH vS7+IAfeISlB3jCCCvtZQCMK7E9fVTvaMeKh0c5OwMNLpVv7Sa2AJ8BOq1K/nI/UYdR/ 7/9AaflZI3+h+CzkPsE8J+/nYWwreo4gj+K4pljuimzKW/LpHBeVHftSOt2OLyXezwox W60ms4QrlEYVLqC0URXDgnfOF5wWyBjTjzYjZW5f4JKssUu830bG0sDo9/APV4t/Ta45 /NzFvrItzv3hBpS7s2yLQGoq9qeQgkSbuA9RNAySb/dCTDCFhEYioS1kA/S33mnMJMTM qe3Q== X-Gm-Message-State: AGRZ1gJcxK52ZeD4wHd86eMaXv1+s5RD4Xn8y1I2TN/+2kIVk4dFbibH 8EPj/CgyP9SFusY2DMbZXy466JzI2yQ82IVm/Ngs3Q== X-Google-Smtp-Source: AJdET5dm+nX2/lAfeakwnBJXDtYGfJsNYbAb8pWmsmNrth6fdbLefk1UsZHWDkcGnxGx8N2BGWDDjEN5YPdgzeDbaNQ= X-Received: by 2002:a24:4a95:: with SMTP id k143-v6mr2270172itb.132.1542087459910; Mon, 12 Nov 2018 21:37:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Maxim Solodovnik Date: Tue, 13 Nov 2018 12:37:28 +0700 Message-ID: Subject: Re: Help with migrating one of OpenJPA classes to commons-collections4 To: user@commons.apache.org Content-Type: multipart/alternative; boundary="00000000000042bd21057a85378c" --00000000000042bd21057a85378c Content-Type: text/plain; charset="UTF-8" Hello Gary, we all are volunteers :) Why I'm asking: it will be blocker for OpenJPA release On Tue, 16 Oct 2018 at 19:39, Gary Gregory wrote: > Hi, > > There is no ETA, and since we are all volunteers, it depends on who wants > to step up and take the time to do it. > > Gary > > On Mon, Oct 15, 2018, 22:23 Maxim Solodovnik wrote: > > > Hello Gary, > > > > SNAPSHOT works for us expected :) > > There is no rush, I just want to get some ETA :) > > > > On Tue, 16 Oct 2018 at 00:07, Gary Gregory > wrote: > > > > > Are there any open issues we want to address for 4.3 is the SNAPSHOT OK > > as > > > is? > > > > > > Gary > > > > > > On Mon, Oct 15, 2018 at 10:42 AM Maxim Solodovnik < > solomax666@gmail.com> > > > wrote: > > > > > > > Hello Benedikt, > > > > > > > > I would like to remind you about 4.3 release :) > > > > > > > > On Tue, 25 Sep 2018 at 20:45, Maxim Solodovnik > > > > > wrote: > > > > > > > > > > Great, > > > > > > > > > > Thanks a million! > > > > > > > > > > On Tue, 25 Sep 2018 at 20:39, Benedikt Ritter > > > > wrote: > > > > >> > > > > >> Am Di., 25. Sep. 2018 um 15:36 Uhr schrieb Benedikt Ritter < > > > > >> britter@apache.org>: > > > > >> > > > > >> > Hello Maxim, > > > > >> > Am Mo., 24. Sep. 2018 um 05:32 Uhr schrieb Maxim Solodovnik < > > > > >> > solomax666@gmail.com>: > > > > >> > > > > > >> >> Hello, > > > > >> >> > > > > >> >> could you please create 4.3-SNAPSHOT build? > > > > >> >> > > > > >> > > > > > >> > I'll check whether I have permission to publish a SNAPSHOT build > > to > > > > the > > > > >> > SNAPSHOT repo. > > > > >> > > > > > >> > > > > >> I've deployed the latest code to > > > > >> > > > > > > > > > > https://repository.apache.org/content/repositories/snapshots/org/apache/commons/commons-collections4/4.3-SNAPSHOT/ > > > > >> > > > > >> Regards, > > > > >> Benedikt > > > > >> > > > > >> > > > > >> > > > > > >> > > > > > >> >> > > > > >> >> And if you have any estimates on 4.3 release, could you please > > > share > > > > it? > > > > >> >> :) > > > > >> >> > > > > >> > > > > > >> > We don't have estimates or a roadmap. But I've this on my list, > > > > because I > > > > >> > know you're depending on it. I have two days vacation next week. > > > That > > > > may > > > > >> > be an opportunity for me to work towards a 4.3 release. > > > > >> > > > > > >> > Regards, > > > > >> > Benedikt > > > > >> > > > > > >> > > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> On Thu, 20 Sep 2018 at 17:58, Maxim Solodovnik < > > > solomax666@gmail.com > > > > > > > > > >> >> wrote: > > > > >> >> > > > > >> >> > One more question: it seems there is no 4.3-SNAPSHOT build > > > > available > > > > >> >> > Could you please create it? > > > > >> >> > > > > > >> >> > On Thu, 20 Sep 2018 at 12:47, Maxim Solodovnik < > > > > solomax666@gmail.com> > > > > >> >> > wrote: > > > > >> >> > > > > > > >> >> > > Hello Gary, > > > > >> >> > > > > > > >> >> > > I have tested changes, everything works as expected > > > > >> >> > > Thanks a lot! > > > > >> >> > > > > > > >> >> > > I have closed PR, but have no rights to close JIRA :( > > > > >> >> > > > > > > >> >> > > Do you have any plans for 4.3 release? > > > > >> >> > > On Wed, 19 Sep 2018 at 22:11, Gary Gregory < > > > > garydgregory@gmail.com> > > > > >> >> > wrote: > > > > >> >> > > > > > > > >> >> > > > Maxim, > > > > >> >> > > > Thank you for your patch. > > > > >> >> > > > I created > > > > https://issues.apache.org/jira/browse/COLLECTIONS-696 and > > > > >> >> > > > committed you patch to git master. > > > > >> >> > > > Please verify and close the Jira ticket and GitHub PR. > > > > >> >> > > > > > > > >> >> > > > Thank you, > > > > >> >> > > > Gary > > > > >> >> > > > > > > > >> >> > > > On Wed, Sep 19, 2018 at 1:24 AM Maxim Solodovnik < > > > > >> >> solomax666@gmail.com > > > > >> >> > > > > > > >> >> > > > wrote: > > > > >> >> > > > > > > > >> >> > > > > Done: > > > https://github.com/apache/commons-collections/pull/51 > > > > >> >> > > > > Could you please take a look at this PR? > > > > >> >> > > > > On Thu, 6 Sep 2018 at 03:17, Gary Gregory < > > > > garydgregory@gmail.com > > > > >> >> > > > > > >> >> > wrote: > > > > >> >> > > > > > > > > > >> >> > > > > > Hi, > > > > >> >> > > > > > > > > > >> >> > > > > > Your best shot would be to submit a PR on GitHub > which > > > > includes > > > > >> >> a > > > > >> >> > unit > > > > >> >> > > > > test > > > > >> >> > > > > > that exercises the new code. > > > > >> >> > > > > > > > > > >> >> > > > > > https://github.com/apache/commons-collections > > > > >> >> > > > > > > > > > >> >> > > > > > Thank you, > > > > >> >> > > > > > Gary > > > > >> >> > > > > > > > > > >> >> > > > > > On Wed, Sep 5, 2018 at 10:12 AM Maxim Solodovnik < > > > > >> >> > solomax666@gmail.com> > > > > >> >> > > > > > wrote: > > > > >> >> > > > > > > > > > >> >> > > > > > > Would it be possible to modify the code of > > > > >> >> > AbstractReferenceMap.java as > > > > >> >> > > > > > > follows? > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > diff --git > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java > > > > >> >> > > > > > > index 0eda632f..81f60b4b 100644 > > > > >> >> > > > > > > --- > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java > > > > >> >> > > > > > > +++ > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java > > > > >> >> > > > > > > @@ -400,13 +400,15 @@ public abstract class > > > > >> >> > AbstractReferenceMap > > > > >> >> > > > > > > extends AbstractHashedMap > > > > >> >> > > > > > > HashEntry previous = null; > > > > >> >> > > > > > > HashEntry entry = data[index]; > > > > >> >> > > > > > > while (entry != null) { > > > > >> >> > > > > > > - if (((ReferenceEntry) > > > > entry).purge(ref)) { > > > > >> >> > > > > > > + ReferenceEntry refEntry = > > > > >> >> (ReferenceEntry > > > >> >> > V>) > > > > >> >> > > > > entry; > > > > >> >> > > > > > > + if (refEntry.purge(ref)) { > > > > >> >> > > > > > > if (previous == null) { > > > > >> >> > > > > > > data[index] = entry.next; > > > > >> >> > > > > > > } else { > > > > >> >> > > > > > > previous.next = entry.next; > > > > >> >> > > > > > > } > > > > >> >> > > > > > > this.size--; > > > > >> >> > > > > > > + refEntry.onPurge(); > > > > >> >> > > > > > > return; > > > > >> >> > > > > > > } > > > > >> >> > > > > > > previous = entry; > > > > >> >> > > > > > > @@ -721,12 +723,15 @@ public abstract class > > > > >> >> > AbstractReferenceMap > > > > >> >> > > > > > > extends AbstractHashedMap > > > > >> >> > > > > > > throw new Error(); > > > > >> >> > > > > > > } > > > > >> >> > > > > > > > > > > >> >> > > > > > > + protected void onPurge() { > > > > >> >> > > > > > > + } > > > > >> >> > > > > > > + > > > > >> >> > > > > > > /** > > > > >> >> > > > > > > * Purges the specified reference > > > > >> >> > > > > > > * @param ref the reference to purge > > > > >> >> > > > > > > * @return true or false > > > > >> >> > > > > > > */ > > > > >> >> > > > > > > - boolean purge(final Reference ref) { > > > > >> >> > > > > > > + protected boolean purge(final Reference > > > ref) > > > > { > > > > >> >> > > > > > > boolean r = parent.keyType != > > > > >> >> > ReferenceStrength.HARD && > > > > >> >> > > > > key == > > > > >> >> > > > > > > ref; > > > > >> >> > > > > > > r = r || parent.valueType != > > > > >> >> ReferenceStrength.HARD > > > > >> >> > && > > > > >> >> > > > > value > > > > >> >> > > > > > > == ref; > > > > >> >> > > > > > > if (r) { > > > > >> >> > > > > > > @@ -1073,4 +1078,17 @@ public abstract class > > > > >> >> > AbstractReferenceMap > > > > >> >> > > > > > > extends AbstractHashedMap > > > > >> >> > > > > > > protected boolean isKeyType(final > > > ReferenceStrength > > > > >> >> type) { > > > > >> >> > > > > > > return this.keyType == type; > > > > >> >> > > > > > > } > > > > >> >> > > > > > > + > > > > >> >> > > > > > > + /** > > > > >> >> > > > > > > + * Provided protected read-only access to the > > > value > > > > type. > > > > >> >> > > > > > > + * @param type the type to check against. > > > > >> >> > > > > > > + * @return true if valueType has the specified > > > type > > > > >> >> > > > > > > + */ > > > > >> >> > > > > > > + protected boolean isValueType(final > > > > ReferenceStrength > > > > >> >> type) > > > > >> >> > { > > > > >> >> > > > > > > + return this.valueType == type; > > > > >> >> > > > > > > + } > > > > >> >> > > > > > > + > > > > >> >> > > > > > > + public boolean isPurgeValues() { > > > > >> >> > > > > > > + return purgeValues; > > > > >> >> > > > > > > + } > > > > >> >> > > > > > > } > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > On Mon, 3 Sep 2018 at 20:08, Maxim Solodovnik < > > > > >> >> > solomax666@gmail.com> > > > > >> >> > > > > > > wrote: > > > > >> >> > > > > > > > > > > >> >> > > > > > > > Thanks a lot for the answer, > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > OpenJPA ReferenceHashMap overrides purge method > to > > be > > > > able > > > > >> >> to > > > > >> >> > call > > > > >> >> > > > > > > > custom methods keyExpired/valueExpired [1] > > > > >> >> > > > > > > > I see no way to migrate this code without massive > > > > >> >> copy/paste or > > > > >> >> > > > > > > reflection > > > > >> >> > > > > > > > ... > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > Maybe you can suggest something? > > > > >> >> > > > > > > > Or maybe commons-collections API can be enhanced > so > > > > this > > > > >> >> task > > > > >> >> > will be > > > > >> >> > > > > > > > trivial :) > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > https://github.com/apache/openjpa/blob/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ReferenceHashMap.java#L138 > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > On Mon, 3 Sep 2018 at 20:03, Julio Oliveira > > > > >> >> > > > > > > > wrote: > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > > > What is realy your problem??.. > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > > > On Sat, Sep 1, 2018, 5:46 AM Maxim Solodovnik < > > > > >> >> > > > > solomax666@gmail.com> > > > > >> >> > > > > > > > wrote: > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > > > > Hello, > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > I'm trying to migrate code of Apache OpenJPA > > from > > > > >> >> > > > > commons-collections > > > > >> >> > > > > > > > > > to commons-collections4 > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > The only real issue so far with migrating > this > > > > class > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > >> >> > > > > > > > > > > https://github.com/apache/openjpa/blob/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ReferenceHashMap.java#L112 > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > code of commons-collections4 is more > > restrictive > > > > could > > > > >> >> you > > > > >> >> > please > > > > >> >> > > > > > > > > > suggest how custom purge can be implemented? > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > -- > > > > >> >> > > > > > > > > > WBR > > > > >> >> > > > > > > > > > Maxim aka solomax > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > >> >> > > > --------------------------------------------------------------------- > > > > >> >> > > > > > > > > > To unsubscribe, e-mail: > > > > >> >> > user-unsubscribe@commons.apache.org > > > > >> >> > > > > > > > > > For additional commands, e-mail: > > > > >> >> > user-help@commons.apache.org > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > -- > > > > >> >> > > > > > > > WBR > > > > >> >> > > > > > > > Maxim aka solomax > > > > >> >> > > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > -- > > > > >> >> > > > > > > WBR > > > > >> >> > > > > > > Maxim aka solomax > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> > > > > -- > > > > >> >> > > > > WBR > > > > >> >> > > > > Maxim aka solomax > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> > > > --------------------------------------------------------------------- > > > > >> >> > > > > To unsubscribe, e-mail: > > > user-unsubscribe@commons.apache.org > > > > >> >> > > > > For additional commands, e-mail: > > > > user-help@commons.apache.org > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > -- > > > > >> >> > > WBR > > > > >> >> > > Maxim aka solomax > > > > >> >> > > > > > >> >> > > > > > >> >> > > > > > >> >> > -- > > > > >> >> > WBR > > > > >> >> > Maxim aka solomax > > > > >> >> > > > > > >> >> > > > > >> >> > > > > >> >> -- > > > > >> >> WBR > > > > >> >> Maxim aka solomax > > > > >> >> > > > > >> > > > > > > > > > > > > > > > > > > > > > -- > > > > > WBR > > > > > Maxim aka solomax > > > > > > > > > > > > > > > > -- > > > > WBR > > > > Maxim aka solomax > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > > > > For additional commands, e-mail: user-help@commons.apache.org > > > > > > > > > > > > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax --00000000000042bd21057a85378c--