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 8B3D2CF83 for ; Thu, 11 Jul 2013 13:21:15 +0000 (UTC) Received: (qmail 18197 invoked by uid 500); 11 Jul 2013 13:21:15 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 17763 invoked by uid 500); 11 Jul 2013 13:21:12 -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 17753 invoked by uid 99); 11 Jul 2013 13:21:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 13:21:11 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [81.169.146.161] (HELO mo-p00-ob.rzone.de) (81.169.146.161) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 13:21:03 +0000 X-RZG-AUTH: :KmMWYE27W/ilSTaLlIhIv4iEzodG2oTTmFjMWMkzBbe/NY5q5OLgvjR0tz8= X-RZG-CLASS-ID: mo00 Received: from patina.store (com4.strato.de [81.169.145.237]) by smtp.strato.de (joses mo17) (RZmta 31.29 AUTH) with (RC4-MD5 encrypted) ESMTPA id w0131ap6BCQLlK for ; Thu, 11 Jul 2013 15:20:23 +0200 (CEST) Date: Thu, 11 Jul 2013 15:20:23 +0200 (CEST) From: Ulrich Reply-To: Ulrich To: jackrabbit Message-ID: <1485005924.1865673.1373548823244.open-xchange@com4.strato.de> Subject: Reference to same-name sibling lost when retrieving back node from intermediate storing class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.2.0-Rev10 X-Virus-Checked: Checked by ClamAV on apache.org While researching nodes I build for each of these nodes a new object with some methods to be tested. So I have a class "ComparableNode": private Session session; private final Node node; public ComparableNode(Node node) throws Exception { this.node=node; this.session=node.getSession(); LOGGER.info("Nodename2="+node.getPath()); buildEffectiveACL(); } public Node getNode() throws RepositoryException { LOGGER.info("Nodename3="+node.getPath()); return this.node; } The class is instantiated by: LOGGER.info("Nodename1="+node.getPath()); ComparableNode cmpNode = new ComparableNode(node); LOGGER.info("Nodename4="+cmpNode.getNode()); The node itself partially contains a same-name sibling; by retrieving the node from my ComparableNode I lose the index of the sibling. So when researching: /content/sibling[2]/mynode I get these messages: Nodename1=/content/sibling[2]/mynode Nodename2=/content/sibling[2]/mynode Nodename3=/content/sibling/mynode Nodename4=/content/sibling/mynode As you can see the node itself is stored to a final variable by the constructor of ComparableNode. But when retrieving it, it represents a different node. Any idea, whats going on here? brgds, Ulrich