Source:
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, 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; }

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; }