Empty version strings not parsed correctly

Bug #826636 reported by Jon Nicholson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open ADK for Java
New
Undecided
Unassigned

Bug Description

In the case that a ZIS returns a message with an empty Version attribute, i.e. Version="", the ADK will error with a string out of bounds exception rather than an appropriate illegal argument exception.

There is an easy fix. The method "static SIFVersion parse(String)" in the com.edustructures.sifworks.SIFVersion class needs an additional catch block at the end of the method such as:

catch (StringIndexOutOfBoundsException nfe) {
 throw new IllegalArgumentException("\"" + versionStr + "\" is an invalid version string", nfe);
}

This reports a more informative exception.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.