Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFB9D72FE for ; Fri, 14 Oct 2011 10:24:37 +0000 (UTC) Received: (qmail 2123 invoked by uid 500); 14 Oct 2011 10:24:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 1730 invoked by uid 500); 14 Oct 2011 10:24:34 -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 1722 invoked by uid 99); 14 Oct 2011 10:24:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 10:24:33 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2011 10:24:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0130D30769B for ; Fri, 14 Oct 2011 10:24:12 +0000 (UTC) Date: Fri, 14 Oct 2011 10:24:12 +0000 (UTC) From: "Julian Reschke (Commented) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1897913960.13473.1318587852006.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <186236097.8652.1318504871826.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (JCR-3111) InternalVersionManagerBase; missing null check after getNode() 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/JCR-3111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13127415#comment-13127415 ] Julian Reschke commented on JCR-3111: ------------------------------------- Actually, NodeStateEx.getNode(name, ...) *only* returns null if the child node entry is not found: ChildNodeEntry entry = nodeState.getChildNodeEntry(name, index); if (entry == null) { return null; } ...otherwise it throws. So if the NPE happens in getVersionHistoryOfNode (and it has...), this indicates that some strange is happening which can't even be explained by inconsistent storage. So a better approach seems to be to simply add null checks, and add better diagnostics for now. Maybe this will help understanding what's going on next time it happens. > InternalVersionManagerBase; missing null check after getNode() > -------------------------------------------------------------- > > Key: JCR-3111 > URL: https://issues.apache.org/jira/browse/JCR-3111 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, versioning > Reporter: Julian Reschke > Assignee: Julian Reschke > Attachments: JCR-3111.patch > > > There are at least two instances where we check for a node with hasNode(), and then call getNode() without checking for null. -- 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