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 73F7B937E for ; Thu, 13 Oct 2011 11:23:33 +0000 (UTC) Received: (qmail 65525 invoked by uid 500); 13 Oct 2011 11:23:33 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 65486 invoked by uid 500); 13 Oct 2011 11:23:33 -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 65479 invoked by uid 99); 13 Oct 2011 11:23:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2011 11:23: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; Thu, 13 Oct 2011 11:23: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 CB7A7306F0D for ; Thu, 13 Oct 2011 11:23:11 +0000 (UTC) Date: Thu, 13 Oct 2011 11:23:11 +0000 (UTC) From: "Julian Reschke (Commented) (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1051718656.8654.1318504991834.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=13126490#comment-13126490 ] Julian Reschke commented on JCR-3111: ------------------------------------- For instance, in getVersionHistoryOfNode: public InternalVersionHistory getVersionHistoryOfNode(NodeId id) throws RepositoryException { VersioningLock.ReadLock lock = acquireReadLock(); try { String uuid = id.toString(); Name name = getName(uuid); NodeStateEx parent = getParentNode(getHistoryRoot(), uuid, null); if (parent != null && parent.hasNode(name)) { NodeStateEx history = parent.getNode(name, 1); return getVersionHistory(history.getNodeId()); } else { throw new ItemNotFoundException("Version history of node " + id + " not found."); } } finally { lock.release(); } } > 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 > > 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