Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 68377 invoked from network); 27 Apr 2009 11:39:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Apr 2009 11:39:52 -0000 Received: (qmail 31787 invoked by uid 500); 27 Apr 2009 11:39:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 31698 invoked by uid 500); 27 Apr 2009 11:39:51 -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 31684 invoked by uid 99); 27 Apr 2009 11:39:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2009 11:39:51 +0000 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; Mon, 27 Apr 2009 11:39:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9D8A9234C4B0 for ; Mon, 27 Apr 2009 04:39:30 -0700 (PDT) Message-ID: <129626929.1240832370644.JavaMail.jira@brutus> Date: Mon, 27 Apr 2009 04:39:30 -0700 (PDT) From: "Manfred Baedke (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1773) shareable nodes: wrong path returned, causes remove() to delete wrong node In-Reply-To: <1311499078.1222424745318.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703080#action_12703080 ] Manfred Baedke commented on JCR-1773: ------------------------------------- I am not quite sure if I got it right: Now if you try the test with Node item = session.getNode(path) instead of Item item = session.getItem(path) the test works as expected. So it is now possible that for a given path P session.getNode(P).equals(session.getItem(P)) will return false? Isn't that totally inconsistent? > shareable nodes: wrong path returned, causes remove() to delete wrong node > -------------------------------------------------------------------------- > > Key: JCR-1773 > URL: https://issues.apache.org/jira/browse/JCR-1773 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Reporter: Julian Reschke > > It seems that for shareable nodes it can happen that getPath() returns the wrong path (one of another node in the shared set): > /** > * Verify that shared nodes return correct paths. > */ > public void testPath() throws Exception { > Node a1 = testRootNode.addNode("a1"); > Node a2 = a1.addNode("a2"); > Node b1 = a1.addNode("b1"); > b1.addMixin("mix:shareable"); > testRootNode.save(); > //now we have a shareable node N with path a1/b1 > Session session = testRootNode.getSession(); > Workspace workspace = session.getWorkspace(); > String path = a2.getPath() + "/b2"; > workspace.clone(workspace.getName(), b1.getPath(), path, false); > //now we have another shareable node N' in the same shared set as N with path a1/a2/b2 > //using the path a1/a2/b2, we should get the node N' here > Item item = session.getItem(path); > String p = item.getPath(); > assertFalse("unexpectedly got the path from another node from the same shared set ", p.equals(b1.getPath())); > } > Note that when this happens, a subsequent remove() deletes the wrong node. > (Thanks Manfred for spotting this one). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.