@Test public void testConvert_URL_WithSpacesBefore() throws Exception { URLConverter converter = new URLConverter(); assertThat(new URL("http: }
@Override public URL convert(String value, ConversionContext ctx) { ctx.addSupportedFormats(getClass(),"<URL>"); if(value==null){ return null; } String trimmed = value.trim(); try { return new URL(trimmed); } catch (Exception e) { LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e); } return null; }
URLConverter implements PropertyConverter<URL> { @Override public URL convert(String value, ConversionContext ctx) { ctx.addSupportedFormats(getClass(),"<URL>"); if(value==null){ return null; } String trimmed = value.trim(); try { return new URL(trimmed); } catch (Exception e) { LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e); } return null; } }
URLConverter implements PropertyConverter<URL> { @Override public URL convert(String value, ConversionContext ctx) { ctx.addSupportedFormats(getClass(),"<URL>"); if(value==null){ return null; } String trimmed = value.trim(); try { return new URL(trimmed); } catch (Exception e) { LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e); } return null; }  }
URLConverter implements PropertyConverter<URL> { @Override public URL convert(String value, ConversionContext ctx) { ctx.addSupportedFormats(getClass(),"<URL>"); if(value==null){ return null; } String trimmed = value.trim(); try { return new URL(trimmed); } catch (Exception e) { LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e); } return null; }  @Override URL convert(String value, ConversionContext ctx); @Override boolean equals(Object o); @Override int hashCode(); }
URLConverter implements PropertyConverter<URL> { @Override public URL convert(String value, ConversionContext ctx) { ctx.addSupportedFormats(getClass(),"<URL>"); if(value==null){ return null; } String trimmed = value.trim(); try { return new URL(trimmed); } catch (Exception e) { LOG.log(Level.FINE, "Unparseable URL: " + trimmed, e); } return null; }  @Override URL convert(String value, ConversionContext ctx); @Override boolean equals(Object o); @Override int hashCode();  }