You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Be more defensive in UrlResource about cleaning the path [SPR-17198] #21732
A straightforward refinement for a start is to only create a new URL instance if the cleaned path actually differs from the original path. This should cover most internal use of UrlResource and avoid common Graal issues with it that way.
Ha, seems we posted at exactly the same time there ;-) Got the change locally working already, let's see how far we get with it (to be pushed ASAP)... I quite like it as a general optimization, avoiding the repeated URL parsing effort. I was experimenting with handling the cleaned path as a String but unfortunately that causes some regressions due to special handling in URL.equals, so the "original URL as far as possible" approach sounds like the best compromise.
Activity
spring-projects-issues commentedon Aug 22, 2018
Dave Syer commented
PR: #1936 (verified to work with Graal AOT).
spring-projects-issues commentedon Aug 22, 2018
Juergen Hoeller commented
A straightforward refinement for a start is to only create a new
URLinstance if the cleaned path actually differs from the original path. This should cover most internal use ofUrlResourceand avoid common Graal issues with it that way.spring-projects-issues commentedon Aug 22, 2018
Dave Syer commented
That would also work. I can change the PR if you want.
spring-projects-issues commentedon Aug 22, 2018
Juergen Hoeller commented
Ha, seems we posted at exactly the same time there ;-) Got the change locally working already, let's see how far we get with it (to be pushed ASAP)... I quite like it as a general optimization, avoiding the repeated URL parsing effort. I was experimenting with handling the cleaned path as a String but unfortunately that causes some regressions due to special handling in
URL.equals, so the "original URL as far as possible" approach sounds like the best compromise.