You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (Commented) (JIRA)" <ji...@apache.org> on 2011/10/13 13:23:11 UTC
[jira] [Commented] (JCR-3111) InternalVersionManagerBase; missing
null check after getNode()
[ 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