From users-return-19227-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Nov 2 08:56:37 2012 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 DAB24D101 for ; Fri, 2 Nov 2012 08:56:36 +0000 (UTC) Received: (qmail 93195 invoked by uid 500); 2 Nov 2012 08:56:36 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 92999 invoked by uid 500); 2 Nov 2012 08:56:35 -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 92962 invoked by uid 99); 2 Nov 2012 08:56:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2012 08:56:34 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.1.31] (HELO exprod6og113.obsmtp.com) (64.18.1.31) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Nov 2012 08:56:23 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob113.postini.com ([64.18.5.12]) with SMTP ID DSNKUJOKopFu6RK8RlCzM+P9qNmr1WTUrzU7@postini.com; Fri, 02 Nov 2012 01:56:03 PDT Received: from inner-relay-4.eur.adobe.com (inner-relay-4.adobe.com [193.104.215.14]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id qA28rF1v016285 for ; Fri, 2 Nov 2012 01:53:16 -0700 (PDT) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id qA28txXM018751 for ; Fri, 2 Nov 2012 01:56:00 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas02.corp.adobe.com (10.8.189.100) with Microsoft SMTP Server (TLS) id 8.3.279.1; Fri, 2 Nov 2012 01:55:59 -0700 Received: from susi.local (10.136.137.164) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.279.1; Fri, 2 Nov 2012 08:55:57 +0000 Message-ID: <50938A9D.6020208@apache.org> Date: Fri, 2 Nov 2012 08:55:57 +0000 From: =?UTF-8?B?TWljaGFlbCBEw7xyaWc=?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Subject: Re: Node property type constraints violated when setting strings References: <5092EF5B.3040606@oracle.com> In-Reply-To: <5092EF5B.3040606@oracle.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Jessi, The repository will try to convert the string to a boolean. See 3.6.4 Property Type Conversion in JSR 283. Michael On 1.11.12 21:53, Jessi Abrahams wrote: > Hi, > I'm new to this list so I apologize if this question has been asked (I > tried searching the archives) or if this is not the right place to ask. > > I have a custom node type with a definition like this: > > [foo:bar] > mix:lastModified, mix:created, nt:base > - someBooleanProperty (BOOLEAN) > > When I create a node of this type and use any of the setProperty methods > on Node, the repository allows me to set string values (such as "abc") > for someBooleanProperty even though as far as I understand from the type > definition, only booleans should be allowed. The repository throws a > ConstraintViolationException (as I would expect) if I try to to set > someBooleanProperty to any other incorrect (non-boolean) type - but not > strings. It seems like properties can always be set to a string, whether > or not it's allowed by the node type definition. Is this expected? It > doesn't seem in line with the spec. > > Thanks > Jessi > > >