class 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;
    }

}