Optimize NIO path resolution in PathEditor

Closes gh-35304
This commit is contained in:
Juergen Hoeller
2025-08-11 14:32:39 +02:00
parent f11a1e6f82
commit 3781ba223e
@@ -103,7 +103,7 @@ public class PathEditor extends PropertyEditorSupport {
if (resource == null) {
setValue(null);
}
else if (nioPathCandidate && !resource.exists()) {
else if (nioPathCandidate && (!resource.isFile() || !resource.exists())) {
setValue(Paths.get(text).normalize());
}
else {