Bug 787055 - Exception with "skynet list -"
Summary: Exception with "skynet list -"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-03 03:11 UTC by Joshua Wulf
Modified: 2014-10-19 23:00 UTC (History)
2 users (show)

Fixed In Version: 0.16.1
Clone Of:
Environment:
Last Closed: 2012-02-22 02:49:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-02-03 03:11:56 UTC
[jwulf@nitai scratch]$ skynet list -
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
	at java.lang.String.charAt(String.java:694)
	at com.redhat.skynetclient.OptionHandler.parseArgs(OptionHandler.java:785)
	at com.redhat.skynetclient.Client.main(Client.java:57)
	... 5 more

Comment 1 Lee Newson 2012-02-03 04:03:35 UTC
Fixed in 0.16.1.

The problem came from trying to read 2 variables out of an array that only contained one. I've added a check to make sure that it contains at least two variables if not then it'll throw an error.

Comment 2 Joshua Wulf 2012-02-22 02:49:45 UTC
[jwulf@radhe temp]$ csprocessor list -

Error: Invalid argument!

csprocessor list [OPTIONS] [ID]
  OPTIONS:
    --contentspec, -c
    --snapshot, -s
    --force, -F
    
  ID - The ID of the content specification to list snapshots for.


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