// URI scheme not registered for NIO or not meeting Paths requirements:
// let's try URL protocol handlers via Spring's resource mechanism.
}
}
@ -111,8 +111,13 @@ public class PathEditor extends PropertyEditorSupport {
@@ -111,8 +111,13 @@ public class PathEditor extends PropertyEditorSupport {
setValue(resource.getFile().toPath());
}
catch(IOExceptionex){
thrownewIllegalArgumentException(
"Could not retrieve file for "+resource+": "+ex.getMessage());
Stringmsg="Could not resolve \""+text+"\" to 'java.nio.file.Path' for "+resource+": "+
ex.getMessage();
if(nioPathCandidate){
msg+=" - In case of ambiguity, consider adding the 'file:' prefix for an explicit reference "+
"to a file system resource of the same name: \"file:"+text+"\"";