jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Frericks (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-425) NPE in VersionManagerImpl
Date Thu, 04 May 2006 09:44:19 GMT
NPE in VersionManagerImpl

         Key: JCR-425
         URL: http://issues.apache.org/jira/browse/JCR-425
     Project: Jackrabbit
        Type: Bug

  Components: core  
    Reporter: Michael Frericks

Sometimes a NPE occurs in org.apache.jackrabbit.core.version.VersionManagerImpl#internalSetItemReferences
because the parameter item is null.

Up the call hierarchy i would suggest to check item != null in method:

    public boolean setNodeReferences(NodeReferences refs) {
        try {
            InternalVersionItem item = getItem(refs.getTargetId());
            if (item == null)
                return true;
            setItemReferences(item, refs.getReferences());
            return true;
        } catch (RepositoryException e) {
            log.error("Error while setting references: " + e.toString());
            return false;

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message