Source:
<code>private static FormField<?> setFormField(FieldText labelText, String key, FieldValue fieldValue, FieldText valueText, Integer pageNumber, List<ReadResult> readResults) { FormField<?> value; switch (fieldValue.getType()) { case PHONE_NUMBER: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValuePhoneNumber(), valueText); break; case STRING: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueString(), valueText); break; case TIME: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, <START> key, LocalTime.parse(fieldValue.getValueTime(), DateTimeFormatter.ofPattern("HH:mm:ss")), <END> valueText); break; case DATE: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueDate(), valueText); break; case INTEGER: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueInteger(), valueText); break; case NUMBER: value = new FormField<Number>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueNumber(), valueText); break; case ARRAY: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), null, key, toFormFieldArray(fieldValue.getValueArray(), readResults), null); break; case OBJECT: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, toFormFieldObject(fieldValue.getValueObject(), pageNumber, readResults), valueText ); break; default: throw LOGGER.logExceptionAsError(new RuntimeException("FieldValue Type not supported")); } return value; }</code><technical_language>if getValueTime() returns null this work? inputs time extracted receipt a real time, e.g. '36:54:47 PM', field type is set "time" returns null for valueTime</technical_language>

Target:
private static FormField<?> setFormField(FieldText labelText, String key, FieldValue fieldValue, FieldText valueText, Integer pageNumber, List<ReadResult> readResults) { FormField<?> value; switch (fieldValue.getType()) { case PHONE_NUMBER: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValuePhoneNumber(), valueText); break; case STRING: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueString(), valueText); break; case TIME: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueTime() == null ? null : LocalTime.parse(fieldValue.getValueTime(), DateTimeFormatter.ofPattern("HH:mm:ss")), valueText); break; case DATE: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueDate(), valueText); break; case INTEGER: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueInteger(), valueText); break; case NUMBER: value = new FormField<Number>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, fieldValue.getValueNumber(), valueText); break; case ARRAY: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), null, key, toFormFieldArray(fieldValue.getValueArray(), readResults), null); break; case OBJECT: value = new FormField<>(setDefaultConfidenceValue(fieldValue.getConfidence()), labelText, key, toFormFieldObject(fieldValue.getValueObject(), pageNumber, readResults), valueText ); break; default: throw LOGGER.logExceptionAsError(new RuntimeException("FieldValue Type not supported")); } return value; }