@Test(expected = ConverterException.class) public void testRaiseException() { converter.convert("abc"); }
@Override public Boolean convert(String source) { String normalize = source.trim().toLowerCase(); if (TRUE_STRING.contains(normalize)) { return true; } else if (FALSE_STRING.contains(normalize)) { return false; } else { throw new ConverterException(source, getTargetTypeToken().getRawType()); } }
StringToBooleanConverter extends AbstractGenericConverter<String, Boolean> { @Override public Boolean convert(String source) { String normalize = source.trim().toLowerCase(); if (TRUE_STRING.contains(normalize)) { return true; } else if (FALSE_STRING.contains(normalize)) { return false; } else { throw new ConverterException(source, getTargetTypeToken().getRawType()); } } }
StringToBooleanConverter extends AbstractGenericConverter<String, Boolean> { @Override public Boolean convert(String source) { String normalize = source.trim().toLowerCase(); if (TRUE_STRING.contains(normalize)) { return true; } else if (FALSE_STRING.contains(normalize)) { return false; } else { throw new ConverterException(source, getTargetTypeToken().getRawType()); } }  }
StringToBooleanConverter extends AbstractGenericConverter<String, Boolean> { @Override public Boolean convert(String source) { String normalize = source.trim().toLowerCase(); if (TRUE_STRING.contains(normalize)) { return true; } else if (FALSE_STRING.contains(normalize)) { return false; } else { throw new ConverterException(source, getTargetTypeToken().getRawType()); } }  @Override Boolean convert(String source); }
StringToBooleanConverter extends AbstractGenericConverter<String, Boolean> { @Override public Boolean convert(String source) { String normalize = source.trim().toLowerCase(); if (TRUE_STRING.contains(normalize)) { return true; } else if (FALSE_STRING.contains(normalize)) { return false; } else { throw new ConverterException(source, getTargetTypeToken().getRawType()); } }  @Override Boolean convert(String source);  }