Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC2CDF4A8 for ; Wed, 1 May 2013 22:08:46 +0000 (UTC) Received: (qmail 88821 invoked by uid 500); 1 May 2013 22:08:46 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 88797 invoked by uid 500); 1 May 2013 22:08:46 -0000 Mailing-List: contact oak-commits-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-commits@jackrabbit.apache.org Received: (qmail 88788 invoked by uid 99); 1 May 2013 22:08:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 22:08:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 22:08:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 66F4023888E3; Wed, 1 May 2013 22:08:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1478214 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: RootImpl.java TreeImpl.java Date: Wed, 01 May 2013 22:08:23 -0000 To: oak-commits@jackrabbit.apache.org From: mduerig@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130501220823.66F4023888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mduerig Date: Wed May 1 22:08:22 2013 New Revision: 1478214 URL: http://svn.apache.org/r1478214 Log: OAK-798: Review / refactor TreeImpl and related classes Remove deprecated internal API Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java?rev=1478214&r1=1478213&r2=1478214&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java (original) +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java Wed May 1 22:08:22 2013 @@ -177,8 +177,8 @@ public class RootImpl implements Root { @Override public boolean move(String sourcePath, String destPath) { checkLive(); - TreeImpl destParent = rootTree.getTreeOrNull(getParentPath(destPath)); - if (destParent == null) { + TreeImpl destParent = rootTree.getTree(getParentPath(destPath)); + if (!destParent.exists()) { return false; } purgePendingChanges(); Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1478214&r1=1478213&r2=1478214&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java (original) +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java Wed May 1 22:08:22 2013 @@ -413,20 +413,6 @@ public class TreeImpl implements Tree { } /** - * Get a tree for the tree identified by {@code path}. - * - * @param path the path to the child - * @return a {@link Tree} instance for the child at {@code path} or - * {@code null} if no such tree exits or if the tree is not accessible. - */ - @CheckForNull - @Deprecated - TreeImpl getTreeOrNull(String path) { - TreeImpl child = getTree(path); - return child.nodeBuilder.exists() ? child : null; - } - - /** * Update the child order with children that have been removed or added. * Added children are appended to the end of the {@link #OAK_CHILD_ORDER} * property.