@Test public void shouldBeAbleToConvertEmpty() { assertThat(converter.convert("", LocalTime.class, bundle), is(nullValue())); }
public LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle) { try { DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime()); if (out == null) { return null; } return out.toLocalTime(); } catch (Exception e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value)); } }
LocalTimeConverter implements Converter<LocalTime> { public LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle) { try { DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime()); if (out == null) { return null; } return out.toLocalTime(); } catch (Exception e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value)); } } }
LocalTimeConverter implements Converter<LocalTime> { public LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle) { try { DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime()); if (out == null) { return null; } return out.toLocalTime(); } catch (Exception e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value)); } } LocalTimeConverter(Localization localization); }
LocalTimeConverter implements Converter<LocalTime> { public LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle) { try { DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime()); if (out == null) { return null; } return out.toLocalTime(); } catch (Exception e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value)); } } LocalTimeConverter(Localization localization); LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle); }
LocalTimeConverter implements Converter<LocalTime> { public LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle) { try { DateTime out = new LocaleBasedJodaTimeConverter(localization).convert(value, shortTime()); if (out == null) { return null; } return out.toLocalTime(); } catch (Exception e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_time"), value)); } } LocalTimeConverter(Localization localization); LocalTime convert(String value, Class<? extends LocalTime> type, ResourceBundle bundle);  }