Affects: \<5.2.4.RELEASE>
I am trying to use UriComponentsBuilder.newInstance()
in my android application. But I keep getting this exception upon initialization. This happens starting from version 5.2.4.RELEASE.
java.lang.ExceptionInInitializerError
at org.springframework.web.util.UriComponentsBuilder.newInstance(UriComponentsBuilder.java:172)
Caused by: java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 96
^(([^:/?#]+):)?(//(([^@\[/?#]*)@)?(\[[\p{XDigit}:.]*[%\p{Alnum}]*]|[^\[/?#:]*)(:(\d*(?:\{[^/]+?})?))?)?([^?#]*)(\?([^#]*))?(#(.*))?
Comment From: sbrannen
This appears to be a regression introduced in #24470 that only affects Android applications.
https://github.com/spring-projects/spring-framework/commit/273812f9c5122014260a854d81c27fb2e0a017ac#diff-b7ee321c4c2864dd3493c171d139fc498e11de4ef18cfc57dee3c6f5a84e3dc7L83
Comment From: sbrannen
Fixed via f0aa4f4857fbe197c162c9639d24d5bb460eb8f7
Comment From: sbrannen
@manuel2295,
Congratulations on opening your first GitHub issue ever. 👍
The fix for this regression was applied to Spring Framework 5.2.x
in commit 5a5f118efcd399c1473556145a03dd579790179c and will be available in upcoming snapshots for 5.2.18.
We would be grateful if you could verify that the fix works for you in 5.2.18.BUILD-SNAPSHOT
and post back here with a comment to let us know. Details on how to consume snapshots can be found here.
Thanks
Comment From: sbrannen
Our CI server appears to be down at the moment, so I'm not sure when the snapshot will be published.
Comment From: sbrannen
Snapshots for 5.2.18 have been published now. So feel free to try it out and report back.