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 843A17D4B for ; Thu, 11 Aug 2011 15:54:19 +0000 (UTC) Received: (qmail 81594 invoked by uid 500); 11 Aug 2011 15:54:18 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 81552 invoked by uid 500); 11 Aug 2011 15:54:18 -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 81543 invoked by uid 99); 11 Aug 2011 15:54:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 15:54:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.212.42 as permitted sender) Received: from [209.85.212.42] (HELO mail-vw0-f42.google.com) (209.85.212.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 15:54:13 +0000 Received: by vwl1 with SMTP id 1so4139829vwl.1 for ; Thu, 11 Aug 2011 08:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7XRTXcZFmt6BFraOZTij+oQWIp71p/Q9fiajEcRmpAo=; b=gIXd+BlNW7pmEGbCRsgxA6oHLfCNeVmoWauC3ycYXYAo2PLU/JpPeMAtY1/G73HJ31 Kmf+E3IOeAQCvrO6lkLeFT8NKXiqT3Tu8h1KyVbpCjxkconMEifP84yLcg0FGh+5kK1t izs3NK18/h1CWZl43MYjsphI6oYiFLuHulSpg= MIME-Version: 1.0 Received: by 10.52.74.231 with SMTP id x7mr9628211vdv.237.1313078032988; Thu, 11 Aug 2011 08:53:52 -0700 (PDT) Received: by 10.52.157.99 with HTTP; Thu, 11 Aug 2011 08:53:52 -0700 (PDT) In-Reply-To: <4E43F3C0.8060107@liip.ch> References: <4E43F3C0.8060107@liip.ch> Date: Thu, 11 Aug 2011 17:53:52 +0200 Message-ID: Subject: Re: Property::setValue specification From: Stefan Guggisberg To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Thu, Aug 11, 2011 at 5:22 PM, David Buchmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 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/ > > iEYEARECAAYFAk5D87wACgkQqBnXnqWBgIuhbgCeO+yezmf+eqM1xEG6t/8GbhBR > kbwAnAqYx5JtA6xf/HrzspFE/iwqxirB > =OJyi > -----END PGP SIGNATURE----- >