Skip to content

Non-escaped closing curly brace in RegEx results in initialization error on Android #27467

@manuel2295

Description

@manuel2295

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*(?:\{[^/]+?})?))?)?([^?#]*)(\?([^#]*))?(#(.*))?

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions