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