Bug 1019590 - csprocessor fails with invalid zanata values
Summary: csprocessor fails with invalid zanata values
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.3
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-16 06:27 UTC by Lee Newson
Modified: 2013-12-03 22:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-03 22:16:36 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.