@Test public void testDecode__illegalArgument() { String[] illegals = {"1.1", "9aa", "."}; for (String text : illegals) { try { TypeDecoder.decode(type, text); fail(); } catch (TypeDecodingException e) { } } }
public static ValueHolder decode(Type<?> type, String text) { try { return type.decode(text != null ? text.trim() : null); } catch (RuntimeException exception) { throw new TypeDecodingException(exception, text, type); } }
TypeDecoder { public static ValueHolder decode(Type<?> type, String text) { try { return type.decode(text != null ? text.trim() : null); } catch (RuntimeException exception) { throw new TypeDecodingException(exception, text, type); } } }
TypeDecoder { public static ValueHolder decode(Type<?> type, String text) { try { return type.decode(text != null ? text.trim() : null); } catch (RuntimeException exception) { throw new TypeDecodingException(exception, text, type); } } private  TypeDecoder(); }
TypeDecoder { public static ValueHolder decode(Type<?> type, String text) { try { return type.decode(text != null ? text.trim() : null); } catch (RuntimeException exception) { throw new TypeDecodingException(exception, text, type); } } private  TypeDecoder(); static ValueHolder decode(Type<?> type, String text); static ValueHolder convert(Type<?> type, Object obj); static ValueHolder[] convert(Type<?> type, Object[] array); static ValueHolder[] convert(Type<?> type, Collection<?> coll); }
TypeDecoder { public static ValueHolder decode(Type<?> type, String text) { try { return type.decode(text != null ? text.trim() : null); } catch (RuntimeException exception) { throw new TypeDecodingException(exception, text, type); } } private  TypeDecoder(); static ValueHolder decode(Type<?> type, String text); static ValueHolder convert(Type<?> type, Object obj); static ValueHolder[] convert(Type<?> type, Object[] array); static ValueHolder[] convert(Type<?> type, Collection<?> coll);  }