From users-return-17875-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Aug 11 16:24:02 2011 Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E616E79AE for ; Thu, 11 Aug 2011 16:24:01 +0000 (UTC) Received: (qmail 38274 invoked by uid 500); 11 Aug 2011 16:24:01 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 38179 invoked by uid 500); 11 Aug 2011 16:24:00 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 38165 invoked by uid 99); 11 Aug 2011 16:24:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 16:24:00 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of david.buchmann@liip.ch designates 207.126.144.113 as permitted sender) Received: from [207.126.144.113] (HELO eu1sys200aog102.obsmtp.com) (207.126.144.113) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 16:23:53 +0000 Received: from mail-fx0-f41.google.com ([209.85.161.41]) (using TLSv1) by eu1sys200aob102.postini.com ([207.126.147.11]) with SMTP ID DSNKTkQCBXVRLudTrqhKt5EBCK0JtNTKJf8X@postini.com; Thu, 11 Aug 2011 16:23:33 UTC Received: by fxg9 with SMTP id 9so2156139fxg.0 for ; Thu, 11 Aug 2011 09:23:33 -0700 (PDT) Received: by 10.223.96.13 with SMTP id f13mr1932888fan.37.1313079812974; Thu, 11 Aug 2011 09:23:32 -0700 (PDT) Received: from [192.168.2.2] (84-73-129-46.dclient.hispeed.ch [84.73.129.46]) by mx.google.com with ESMTPS id e10sm1674806fak.42.2011.08.11.09.23.31 (version=SSLv3 cipher=OTHER); Thu, 11 Aug 2011 09:23:31 -0700 (PDT) Message-ID: <4E440202.6090207@liip.ch> Date: Thu, 11 Aug 2011 18:23:30 +0200 From: David Buchmann User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Property::setValue specification References: <4E43F3C0.8060107@liip.ch> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 thanks for the feedback. i created an issue for jcr 2.1 http://java.net/jira/browse/JSR_333-41 cheers,david Am 11.08.2011 17:53, schrieb Stefan Guggisberg: > On Thu, Aug 11, 2011 at 5:22 PM, David Buchmann wrote: > hi, > > implementing the php port of jcr as closely to the java spec as the > language differences permit, i have a question about the javadoc of > Property.setValue(Value value) > > the javadoc [1] tells that "If the property type is constrained, then a > best-effort conversion is attempted." > however, the jcr 2.0 specification defines in 3.6.4 an exact list of > what can be converted into which types and when to throw the > ValueFormatException. > the best-effort conversion suggerates that the implementation might > convert more of the cases or "just does something" like convert string > "hello" to integer 1. > >> no, that's not the intention. best-effort in this case means that a conversion >> is attempted but it's not guaranteed to succeed. > > however, such behaviour would result in > non-portable client code because what works with one implementation > works not with an other. > > should the setValue method javadoc read "...then a conversion *according > to jcr spec paragraph 3.6.4* is attempted." ? > >> i agree that the javadoc could be more specific WRT the supported >> value conversions. > >> could you please file a jira issue [0]? > >> thanks >> stefan > >> [0] http://java.net/jira/browse/JSR_333 > > > > cheers,david > > [1] > http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Property.html#setValue%28javax.jcr.Value%29 > [2] > http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.6.4%20Property%20Type%20Conversion >> - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5EAgIACgkQqBnXnqWBgIuiPwCdHl1htMLEDpjWTsannp0ZLqDS JgwAoKnnAbit3Rioq98KGAHJcwMGGaHp =qiKm -----END PGP SIGNATURE-----