@Override public void setAsText(String text) throws IllegalArgumentException { if (StringUtils.hasText(text)) { try { setValue(this.formatter.parse(text, LocaleContextHolder.getLocale())); } catch (IllegalArgumentException ex) { throw ex; } catch (Throwable ex) { throw new IllegalArgumentException("Parse attempt failed for value [" + text + "]", ex); } } else { setValue(null); } }
@Override public void setAsText(String text) throws IllegalArgumentException { if (StringUtils.hasText(text)) { try { setValue(this.formatter.parse(text, LocaleContextHolder.getLocale())); } catch (IllegalArgumentException ex) { throw ex; } catch (Throwable ex) { throw new IllegalArgumentException("Parse attempt failed for value [" + text + "]", ex); } } else { setValue(null); } }
@Override public void setAsText(String text) throws IllegalArgumentException { if (StringUtils.hasText(text)) { try { setValue(this.formatter.parse(text, LocaleContextHolder.getLocale())); } catch (IllegalArgumentException ex) { throw ex; } catch (Throwable ex) { throw new IllegalArgumentException("Parse attempt failed for value [" + text + "]", ex); } } else { setValue(null); } }