org.springframework.util.ResourceUtils#toRelativeURL
drops custom URLStreamHandler
#33561
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
This relates to #33199
Due to the custom encryption of JARs we have a custom
java.net.URLStreamHandler
on URL instance.In recent versions (from 6.1.x) the reimplemented method
org.springframework.util.ResourceUtils#toRelativeURL
fails to retain the originalURLStreamHandler
on the root URL instance. Instead, it uses only the string part of the URL and creates a new one.6.1.x:
toURL(StringUtils.applyRelativePath(root.toString(), relativePath));
vs
6.0.x:
new URL(root, relativePath);
I propose similar approach as was the fix for #33199
The text was updated successfully, but these errors were encountered: