@Test public void shouldNotComplainAboutNull() { assertThat(converter.convert(null, Float.class, bundle), is(nullValue())); }
public Float convert(String value, Class<? extends Float> type, ResourceBundle bundle) { if (isNullOrEmpty(value)) { return null; } try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value)); } }
FloatConverter implements Converter<Float> { public Float convert(String value, Class<? extends Float> type, ResourceBundle bundle) { if (isNullOrEmpty(value)) { return null; } try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value)); } } }
FloatConverter implements Converter<Float> { public Float convert(String value, Class<? extends Float> type, ResourceBundle bundle) { if (isNullOrEmpty(value)) { return null; } try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value)); } }  }
FloatConverter implements Converter<Float> { public Float convert(String value, Class<? extends Float> type, ResourceBundle bundle) { if (isNullOrEmpty(value)) { return null; } try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value)); } }  Float convert(String value, Class<? extends Float> type, ResourceBundle bundle); }
FloatConverter implements Converter<Float> { public Float convert(String value, Class<? extends Float> type, ResourceBundle bundle) { if (isNullOrEmpty(value)) { return null; } try { return Float.valueOf(value); } catch (NumberFormatException e) { throw new ConversionError(MessageFormat.format(bundle.getString("is_not_a_valid_number"), value)); } }  Float convert(String value, Class<? extends Float> type, ResourceBundle bundle);  }