chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-958) InMemory server failing CmisJS tests, cause found, patch suggested
Date Thu, 19 Nov 2015 11:29:11 GMT

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

Mime
View raw message