use of org.joda.time.format.DateTimeParserBucket in project whole by wholeplatform.
the class AbstractISO8601DataTypeParser method parseObject.
public Object parseObject(EntityDescriptor<?> ed, String value) {
DateTimeParser parser = getFormatter().getParser();
DateTimeParserBucket bucket = new DateTimeParserBucket(0, ISOChronology.getInstance(), null);
// use a custom UTC to check if offset part is parsed
if (bucket.getZone() == null)
bucket.setZone(UTC);
if (parser.parseInto(bucket, value, 0) < 0)
throw new WholeIllegalArgumentException(WholeMessages.no_data_type);
DateTimeZone zone = bucket.getZone();
if (zone == null)
return parseWithTimeZone(bucket);
else
return parseWithoutTimeZone(bucket);
}
Aggregations