Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6BEFE187C3 for ; Thu, 19 Nov 2015 11:29:11 +0000 (UTC) Received: (qmail 54089 invoked by uid 500); 19 Nov 2015 11:29:11 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 54032 invoked by uid 500); 19 Nov 2015 11:29:11 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 53759 invoked by uid 99); 19 Nov 2015 11:29:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Nov 2015 11:29:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 13D222C1F6A for ; Thu, 19 Nov 2015 11:29:11 +0000 (UTC) Date: Thu, 19 Nov 2015 11:29:11 +0000 (UTC) From: =?utf-8?Q?Florian_M=C3=BCller_=28JIRA=29?= To: dev@chemistry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CMIS-958) InMemory server failing CmisJS tests, cause found, patch suggested MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-958?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Florian M=C3=BCller 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=C3=BCller > Fix For: OpenCMIS 0.14.0 > > Original Estimate: 1h > Remaining Estimate: 1h > > The InMemory server is failing the test suites from the CmisJS project (h= ttps://github.com/agea/CmisJS), I traced it down to a somewhat straightforw= ard bug in ObjectService.java (in package org.apache.chemistry.opencmis.ser= ver.impl.browser), around line 494, see below: > {code} > String changeToken =3D (changeTokens !=3D null && changeTokens.size() > i= ? changeTokens.get(i) : null); > if (changeToken.length() =3D=3D 0) { > changeToken =3D 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 lin= e to: > {code} > if ( (changeToken!=3Dnull) && (changeToken.length()=3D=3D0) ) { > {code} > Wondering if this makes sense to you all... -- This message was sent by Atlassian JIRA (v6.3.4#6332)