switch (values.length) {
case 1:
try {
numbers.add(Short.parseShort(values[0]));
} catch (NumberFormatException nfe) {
throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
}
numbers.add(new Short("0"));
numbers.add(new Short("0"));
break;
case 2:
try {
numbers.add(Short.parseShort(values[0]));
} catch (NumberFormatException nfe) {
throw new FieldDataInvalidException("Value of:" + values[0] + " is invalid for field:" + id);
}
try {
numbers.add(Short.parseShort(values[1]));
} catch (NumberFormatException nfe) {
throw new FieldDataInvalidException("Value of:" + values[1] + " is invalid for field:" + id);
}
numbers.add(new Short("0"));
break;
default:
throw new FieldDataInvalidException("Value is invalid for field:" + id);
}
}