[ 
https://issues.apache.org/jira/browse/OAK-3180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14655297#comment-14655297
 ] 

angela commented on OAK-3180:
-----------------------------

not sure if i am looking at the right {{ReadWriteVersionManager}}... the one in 
my checkout at 
{{org.apache.jackrabbit.oak.jcr.version.ReadWriteVersionManager}} actually does 
the following:

{code}
@Nonnull
    private Tree getExistingBaseVersion(@Nonnull Tree versionableTree) throws 
RepositoryException {
        Tree baseVersion = getBaseVersion(versionableTree);
        if (baseVersion == null) {
            throw new IllegalStateException("Base version does not exist.");
        }
        return baseVersion;
    }
{code}

the proposed patch therefore looks completely redundant and misleading to me. 
[[email protected]] am i missing something?


> Versioning: improve diagnostics when version history state is broken
> --------------------------------------------------------------------
>
>                 Key: OAK-3180
>                 URL: https://issues.apache.org/jira/browse/OAK-3180
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.2.3, 1.3.3, 1.0.18
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>             Fix For: 1.2.4, 1.3.4, 1.0.19
>
>         Attachments: OAK-3180.diff
>
>
> Users suffering from the problem described in OAK-3169 may encounter NPEs 
> upon checkin(), as ReadWriteVersionManager.checkin() does not check the 
> return value of getExistingBaseVersion() for null. Even if we can't fix the 
> underlying problem easily, we should at least provide better diagnostics.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to