@Test public void testConvertToModel_MaxTwoDigitYear() { LocalDate date = LocalDate.of(39, 12, 31); assertThat((converter.convertToModel(date, context)) .getOrThrow(s -> new AssertionError(s)), is(TwoDigitYearUtil.convert(date))); }
@CheckForNull @Override public Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context) { if (value == null) { return Result.ok(null); } else { return Result.ok(TwoDigitYearUtil.convert(value)); } }
TwoDigitYearLocalDateConverter implements Converter<LocalDate, LocalDate> { @CheckForNull @Override public Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context) { if (value == null) { return Result.ok(null); } else { return Result.ok(TwoDigitYearUtil.convert(value)); } } }
TwoDigitYearLocalDateConverter implements Converter<LocalDate, LocalDate> { @CheckForNull @Override public Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context) { if (value == null) { return Result.ok(null); } else { return Result.ok(TwoDigitYearUtil.convert(value)); } }  }
TwoDigitYearLocalDateConverter implements Converter<LocalDate, LocalDate> { @CheckForNull @Override public Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context) { if (value == null) { return Result.ok(null); } else { return Result.ok(TwoDigitYearUtil.convert(value)); } }  @CheckForNull @Override Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context); @Override LocalDate convertToPresentation(LocalDate value, ValueContext context); }
TwoDigitYearLocalDateConverter implements Converter<LocalDate, LocalDate> { @CheckForNull @Override public Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context) { if (value == null) { return Result.ok(null); } else { return Result.ok(TwoDigitYearUtil.convert(value)); } }  @CheckForNull @Override Result<LocalDate> convertToModel(@CheckForNull LocalDate value, ValueContext context); @Override LocalDate convertToPresentation(LocalDate value, ValueContext context);  }