How about either use `resource.toURI()` or even better change the return type of the `findResource` to `URI` so that we don't need to do any conversion?