Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 13994 invoked from network); 26 Nov 2008 10:07:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2008 10:07:36 -0000 Received: (qmail 94923 invoked by uid 500); 26 Nov 2008 10:07:46 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 94889 invoked by uid 500); 26 Nov 2008 10:07:46 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 94878 invoked by uid 99); 26 Nov 2008 10:07:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 02:07:46 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2008 10:06:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8D223234C29B for ; Wed, 26 Nov 2008 02:06:44 -0800 (PST) Message-ID: <1031214581.1227694004576.JavaMail.jira@brutus> Date: Wed, 26 Nov 2008 02:06:44 -0800 (PST) From: "Julian Reschke (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1880) Same name sibling: Jackrabbit behaves differently when calling Node.getPath() In-Reply-To: <2136826175.1227619544257.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650913#action_12650913 ] Julian Reschke commented on JCR-1880: ------------------------------------- Wrong paths being reported can lead indirectly to data loss, such as when they are used subsequently in delete operations... (there's a similar issue with shared nodes where sometime the wrong path is being reported... JCR-1773) > Same name sibling: Jackrabbit behaves differently when calling Node.getPath() > ----------------------------------------------------------------------------- > > Key: JCR-1880 > URL: https://issues.apache.org/jira/browse/JCR-1880 > Project: Jackrabbit > Issue Type: Bug > Reporter: Thomas Mueller > Priority: Minor > > The following test case behaves differently when calling Node.getPath() versus not calling it: > void test(boolean index) throws Exception { > FileUtils.deleteDirectory(new File("repository")); > Repository rep = new TransientRepository(); > Session session = rep.login(new SimpleCredentials("", new char[0])); > Node test = session.getRootNode().addNode("test"); > Node a = test.addNode("a"); > Node b = a.addNode("b"); > session.save(); > session.move("/test/a/b", "/test/a"); > if (index) { > b.getPath(); > } > session.move("/test/a", "/test/a"); > System.out.println("a: " + a.getPath()); > System.out.println("b: " + b.getPath()); > session.logout(); > } > test(true) prints: > a: /test/a[2] > b: /test/a > test(false) prints: > a: /test/a > b: /test/a -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.