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