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
org.opentest4j.AssertionFailedError: [/{var:a{{1,2}}}
^
Exception occurred in regex pattern compilation]
Expecting:
<8>
to be equal to:
<6>
but was not.
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at org.springframework.web.util.pattern.PathPatternParserTests.lambda$checkError$3(PathPatternParserTests.java:441)
at org.springframework.web.util.pattern.PathPatternParserTests.checkError(PathPatternParserTests.java:440)
at org.springframework.web.util.pattern.PathPatternParserTests.regexPathElementPatterns(PathPatternParserTests.java:121)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:567)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
The text was updated successfully, but these errors were encountered:
Create an overloaded variant of checkError() for the /{var:a{{1,2}}} pattern that does not check the expectedPos, but leave the remaining usage of checkError() as-is.
Rationale
If a java.util.regex.PatternSyntaxException is thrown, we cannot influence the "error index" reported in that exception. Thus, we should not assert a specific "expected position" in the org.springframework.web.util.pattern.PatternParseException thrown by org.springframework.web.util.pattern.PathPatternParser.parse(String) for such cases.
Stacktrace:
The text was updated successfully, but these errors were encountered: