mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
fdafd38d2f
For setAsText, if the text argument is a file: URL for a path that does not exist, Paths.get(text) is called where text is a file: URL, which doesn't work - the result is an InvalidPathException. To fix this issue, also check that the resource isn't a file before calling Paths.get(). That way, resources that are files skip to the other branch. Closes gh-26575