Hi,
It would be nice for Compass to provide an URIConverter out of the box. There is already a URLConverter, so the addition of a URIConverter makes sense to me. It's a trivial class:
public class URIConverter extends AbstractBasicConverter {
public Object fromString(String str, ResourcePropertyMapping resourcePropertyMapping) {
try {
return new URI(str);
} catch (URISyntaxException e) {
throw new ConversionException("Failed to conver uri", e);
}
}
}
Given some of the problems of the URL class (a horrible equals implementation that can cause nasty performance issues), it would be nice to make it as easy to use the alternative.