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

Florian Müller updated CMIS-958:
--------------------------------
             Assignee: Florian Müller
    Affects Version/s:     (was: OpenCMIS 0.14.0)
                       OpenCMIS 0.13.0

> 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)

Reply via email to