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 96D7095FF for ; Tue, 31 Jul 2012 14:05:36 +0000 (UTC) Received: (qmail 15323 invoked by uid 500); 31 Jul 2012 14:05:35 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 15292 invoked by uid 500); 31 Jul 2012 14:05:35 -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 15277 invoked by uid 99); 31 Jul 2012 14:05:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2012 14:05:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id DF736142851 for ; Tue, 31 Jul 2012 14:05:34 +0000 (UTC) Date: Tue, 31 Jul 2012 14:05:34 +0000 (UTC) From: "angela (JIRA)" To: oak-dev@jackrabbit.apache.org Message-ID: <932395702.121461.1343743534917.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1015952130.121305.1343741375799.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (OAK-214) PropertyImpl#getParent violates JCR API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OAK-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425782#comment-13425782 ] angela commented on OAK-214: ---------------------------- some other areas in propertydelegate that are odd or broken due to the assumption that parent==null indicates a stale property: 1. toString() will result in NPE: @Override public String toString() { // don't disturb the state: avoid calling resolve() return "PropertyDelegate[/" + parent.getPath() + '/' + propertyState.getName() + ']'; } 2. getStatus() relies on property status obtained from the parent tree being null as a measure to determine if the property is stale while at the same time isStale() checks the parent for being null. to me that looks really troublesome to me having 2 different ways of identifying a stale property. apart from the mere fact that the parent might simply not be accessible without necessarily having a stale property. @Override public boolean isStale() { resolve(); return parent == null; } @Override public Status getStatus() throws InvalidItemStateException { Status propertyStatus = getParentTree().getPropertyStatus(getName()); if (propertyStatus == null) { throw new InvalidItemStateException("Property is stale"); } return propertyStatus; } > PropertyImpl#getParent violates JCR API > --------------------------------------- > > Key: OAK-214 > URL: https://issues.apache.org/jira/browse/OAK-214 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr > Reporter: angela > > Item#getParent mandates that an AccessDeniedException is thrown if the > parent of an item is not accessible. > however, the implementation in this case throws an InvalidItemStateException("Property is stale") and PropertyDelegate#getParent marks the return value as @Nonnull. > most probably that needs some additional fixed down the line and isn't as > trivial to fix as oak-213 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira