Return-Path: X-Original-To: apmail-zest-dev-archive@minotaur.apache.org Delivered-To: apmail-zest-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4F2D18520 for ; Thu, 16 Jul 2015 15:50:00 +0000 (UTC) Received: (qmail 13765 invoked by uid 500); 16 Jul 2015 15:50:00 -0000 Delivered-To: apmail-zest-dev-archive@zest.apache.org Received: (qmail 13726 invoked by uid 500); 16 Jul 2015 15:50:00 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 13713 invoked by uid 99); 16 Jul 2015 15:50:00 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2015 15:50:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 08E21C0910 for ; Thu, 16 Jul 2015 15:50:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.98 X-Spam-Level: *** X-Spam-Status: No, score=3.98 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Ep2fkFC0NYiX for ; Thu, 16 Jul 2015 15:49:48 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 8E49A25077 for ; Thu, 16 Jul 2015 15:49:47 +0000 (UTC) Received: from mfilter37-d.gandi.net (mfilter37-d.gandi.net [217.70.178.168]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id B2CD3FB8C9 for ; Thu, 16 Jul 2015 17:49:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter37-d.gandi.net Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter37-d.gandi.net (mfilter37-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id HHCl6MlU-u1J for ; Thu, 16 Jul 2015 17:49:38 +0200 (CEST) X-Originating-IP: 212.195.187.94 Received: from [192.168.1.3] (bne75-h07-212-195-187-94.dsl.sta.abo.bbox.fr [212.195.187.94]) (Authenticated sender: paul@nosphere.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id EFC2FFB882 for ; Thu, 16 Jul 2015 17:49:37 +0200 (CEST) Message-ID: <55A7D290.306@nosphere.org> Date: Thu, 16 Jul 2015 17:49:36 +0200 From: Paul Merlin User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@zest.apache.org Subject: Re: Deserialization of Arrays References: <55A7D06D.5020109@nosphere.org> In-Reply-To: <55A7D06D.5020109@nosphere.org> X-Enigmail-Version: 1.2.3 Content-Type: multipart/alternative; boundary="------------080004020002050603020809" --------------080004020002050603020809 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Paul Merlin a =C3=A9crit : > Niclas Hedhman a =C3=A9crit : >> I think that the "Array"-case at root level was effectively ignored in= the >> current ValueSerialization system. > Yup, during the 2.0 rewrite of serialization I kept the serialization > backward compatible and arrays are one of thoses cases ... > > Moreover, Property<"SomeArrayType"> support is itself flakky. > For example it fails at equality tests. > > See: > - Absence of []s in ValueEqualityTest.java > - Absence of []s in PropertyEqualityTest.java > - Comments in AbstractValueCompositeSerializationTest.java#L188 > > There's PropertyStringArrayTest.java but it does not cover much. > > This raised the very question of supporting []s in the past. To add to that. We have *no* []'s in the model used to test query engines. See `org.qi4j.test.indexing.model` package in core/testsupport. Finally, even arrays of "primitive types" bring in some complexity: if String[] or int[] could be treated as collections, byte[] should not, most of the time ... Niclas Hedhman a =C3=A9crit : > I would like to fix that the Arrays are serialized "correctly", but sti= ll > do it via "Serialization Variants" (as is coming in effect for Maps), s= o > that the current behavior can remain default, and that 3.0 switches the > default, and allow the legacy way to be declared to be used instead. > > If that is acceptable, I am a bit shaky on the code in deserialization > case, due to the 'streaming' case and will probably need help to sort t= hat > out. Once and if we settle on a way to support arrays properties, this looks like the way to go. I'll help for the streaming deserialization implementation. /Paul =20 --------------080004020002050603020809--