Bug 1019590

Summary: csprocessor fails with invalid zanata values
Product: [Community] PressGang CCMS Reporter: Lee Newson <lnewson>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.2CC: mcaspers
Target Milestone: ---   
Target Release: 1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-03 22:16:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Lee Newson 2013-10-16 06:27:34 UTC
If the user has invalid values for the zanata values in csprocessor.ini then it will throw an NPE when trying to either build/assemble/preview (plus probably other commands). The error is:

java.lang.NullPointerException
         at org.jboss.pressgang.ccms.zanata.ZanataDetails.returnUrl(ZanataDetails.java:70)
         at org.jboss.pressgang.ccms.contentspec.client.commands.BuildCommand.validateServerUrl(BuildCommand.java:946)
         at org.jboss.pressgang.ccms.contentspec.client.Client.processArgs(Client.java:230)
         at org.jboss.pressgang.ccms.contentspec.client.Client.main(Client.java:109)

Comment 1 Lee Newson 2013-11-05 02:25:27 UTC
Fixed in 1.3-SNAPSHOT build 201311051217

The problem was caused by how the zanata url was being generated. Since it was doing an indexOf() call on the url, if it was null then it would throw an NPE.

Comment 2 Matthew Casperson 2013-11-27 20:49:58 UTC
Tested with an empty "default.url", a missing "default.url" and a "default.url" that was not a url.

Also tried with a missing "default" and an invalid "default".

None threw a NPE.