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 840DA7358 for ; Thu, 11 Aug 2011 15:23:16 +0000 (UTC) Received: (qmail 7527 invoked by uid 500); 11 Aug 2011 15:23:15 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 7477 invoked by uid 500); 11 Aug 2011 15:23:15 -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 7468 invoked by uid 99); 11 Aug 2011 15:23:14 -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 15:23:14 +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.149 as permitted sender) Received: from [207.126.144.149] (HELO eu1sys200aog120.obsmtp.com) (207.126.144.149) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2011 15:23:07 +0000 Received: from mail-ww0-f46.google.com ([74.125.82.46]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKTkPzx8YeeEDm1RHrpMQWJqBUToq91D5m@postini.com; Thu, 11 Aug 2011 15:22:47 UTC Received: by mail-ww0-f46.google.com with SMTP id 27so2205743wwf.15 for ; Thu, 11 Aug 2011 08:22:47 -0700 (PDT) Received: by 10.227.27.194 with SMTP id j2mr2805780wbc.96.1313076167268; Thu, 11 Aug 2011 08:22:47 -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 eq21sm1366020wbb.35.2011.08.11.08.22.45 (version=SSLv3 cipher=OTHER); Thu, 11 Aug 2011 08:22:46 -0700 (PDT) Message-ID: <4E43F3C0.8060107@liip.ch> Date: Thu, 11 Aug 2011 17:22:40 +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: Property::setValue specification X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----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. 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." ? 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-----