You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Steven Li (JIRA)" <ji...@apache.org> on 2015/11/19 04:28:11 UTC
[jira] [Created] (CMIS-958) InMemory failing CmisJS tests, cause
found, patch suggested
Steven Li created CMIS-958:
------------------------------
Summary: InMemory 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.14.0
Environment: CentOS 7.1
Reporter: Steven Li
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:
String changeToken = (changeTokens != null && changeTokens.size() > i ? changeTokens.get(i) : null);
if (changeToken.length() == 0) {
changeToken = null;
}
The first statement would sometimes yields a "null" value, which is then used immediately always as valid object, resulting in NullPointerException. A reasonable patch would be to change the 2nd line to:
if ( (changeToken!=null) && (changeToken.length()==0) ) {
Wondering if this makes sense to you all...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)