Issue: SPR-16140
@ -70,6 +70,14 @@ public class FileUrlResource extends UrlResource implements WritableResource {
}
@Override
public Resource createRelative(String relativePath) throws MalformedURLException {
if (relativePath.startsWith("/")) {
relativePath = relativePath.substring(1);
return new FileUrlResource(new URL(getURL(), relativePath));
public boolean isWritable() {
try {
@ -183,7 +183,7 @@ public class UrlResource extends AbstractFileResolvingResource {
* This implementation returns the underlying URL reference.
*/
public URL getURL() throws IOException {
public URL getURL() {
return this.url;