Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-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 D33AFDEE6 for ; Wed, 17 Oct 2012 12:27:51 +0000 (UTC) Received: (qmail 43939 invoked by uid 500); 17 Oct 2012 12:27:51 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 43764 invoked by uid 500); 17 Oct 2012 12:27:50 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 43718 invoked by uid 99); 17 Oct 2012 12:27:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 12:27:48 +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 (athena.apache.org: domain of matamel@adobe.com designates 64.18.1.35 as permitted sender) Received: from [64.18.1.35] (HELO exprod6og115.obsmtp.com) (64.18.1.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 12:27:39 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob115.postini.com ([64.18.5.12]) with SMTP ID DSNKUH6kJg1z5YlJBWw44cEUS5wbSOp1E8XN@postini.com; Wed, 17 Oct 2012 05:27:19 PDT Received: from inner-relay-1.corp.adobe.com (inner-relay-1.sea.adobe.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q9HCRGKd009065 for ; Wed, 17 Oct 2012 05:27:17 -0700 (PDT) Received: from nacas03.corp.adobe.com (nacas03.corp.adobe.com [10.8.189.121]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q9HCRGNc004455 for ; Wed, 17 Oct 2012 05:27:16 -0700 (PDT) Received: from SJ1SWM219.corp.adobe.com (10.5.77.61) by nacas03.corp.adobe.com (10.8.189.121) with Microsoft SMTP Server (TLS) id 8.3.279.1; Wed, 17 Oct 2012 05:27:15 -0700 Received: from NAMBX02.corp.adobe.com ([10.8.127.96]) by SJ1SWM219.corp.adobe.com ([fe80::d55c:7209:7a34:fcf7%11]) with mapi; Wed, 17 Oct 2012 05:27:15 -0700 From: Mete Atamel To: "oak-dev@jackrabbit.apache.org" Date: Wed, 17 Oct 2012 05:27:07 -0700 Subject: Re: MicroKernel add/set property Thread-Topic: MicroKernel add/set property Thread-Index: Ac2sYr2gEwFZYDB6RluD+OZMXxAdTQ== Message-ID: In-Reply-To: <507E9DB5.2040709@apache.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.4.120824 acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for pointing out OAK-11. I had also asked these add/set property questions as comments in there but I didn't get a reply back, hence the repost here.=20 -Mete=20 On 10/17/12 1:59 PM, "Michael D=FCrig" wrote: > >Hi, > >This might be topics for https://issues.apache.org/jira/browse/OAK-11 or >sub-issues thereof. > >Michael > >On 16.10.12 15:39, Mete Atamel wrote: >> Hi, >> >> I have 2 questions on MicroKernel add/set property that MicroKernel >> JavaDoc does not seem to answer. >> >> 1- What's the difference between adding a property vs. setting a >>property? >> Are the two following commits basically the same? >> >> mk.commit("/", "+\"a/key1\" : \"value1\"", null, null); >> mk.commit("/", "^\"a/key1\" : \"value1\"", null, null); >> >> >> Or are there scenarios where adding a property acts differently than >> setting a property? >> >> 2- Is adding a property twice supposed to work or is it supposed to >>throw >> a MicroKernelException? For example, this seems to work with >> MicroKernelImpl but is it supposed to? >> >> mk.commit("/", "+\"a/key1\" : \"value1\"", null, null); >> mk.commit("/", "+\"a/key1\" : \"value1\"", null, null); >> >> What about setting a property twice? >> >> >> Thanks, >> Mete >> >>