You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florian Müller (JIRA)" <ji...@apache.org> on 2015/11/19 12:29:11 UTC

[jira] [Resolved] (CMIS-958) InMemory server failing CmisJS tests, cause found, patch suggested

     [ https://issues.apache.org/jira/browse/CMIS-958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller resolved CMIS-958.
---------------------------------
       Resolution: Fixed
    Fix Version/s: OpenCMIS 0.14.0

Thanks for the hint.

> InMemory server failing CmisJS tests, cause found, patch suggested
> ------------------------------------------------------------------
>
>                 Key: CMIS-958
>                 URL: https://issues.apache.org/jira/browse/CMIS-958
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 0.13.0
>         Environment: CentOS 7.1
>            Reporter: Steven Li
>            Assignee: Florian Müller
>             Fix For: OpenCMIS 0.14.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The InMemory server is failing the test suites from the CmisJS project (https://github.com/agea/CmisJS), I traced it down to a somewhat straightforward bug in ObjectService.java (in package org.apache.chemistry.opencmis.server.impl.browser), around line 494, see below:
> {code}
> String changeToken = (changeTokens != null && changeTokens.size() > i ? changeTokens.get(i) : null);
>                 if (changeToken.length() == 0) {
>                     changeToken = null;
>                 }
> {code}
> The first statement would sometimes yields a "null" value, which is then used immediately as a valid object, resulting in NullPointerException when executing the test cases. A reasonable patch would be to change the 2nd line to:
> {code}
>         if ( (changeToken!=null) && (changeToken.length()==0) ) {
> {code}
> Wondering if this makes sense to you all...



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