File tree 1 file changed +4
-3
lines changed
spring-core/src/main/java/org/springframework/util
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -659,7 +659,7 @@ protected static class AntPathStringMatcher {
659
659
660
660
private final List <String > variableNames = new ArrayList <>();
661
661
662
- public AntPathStringMatcher (String pattern , String pathSeparator , boolean caseSensitive ) {
662
+ protected AntPathStringMatcher (String pattern , String pathSeparator , boolean caseSensitive ) {
663
663
this .rawPattern = pattern ;
664
664
this .caseSensitive = caseSensitive ;
665
665
StringBuilder patternBuilder = new StringBuilder ();
@@ -705,7 +705,8 @@ else if (match.startsWith("{") && match.endsWith("}")) {
705
705
}
706
706
707
707
private static Pattern getGlobPattern (String pathSeparator ) {
708
- return Pattern .compile (String .format ("\\ ?|\\ *|\\ {((?:\\ {[^%s]+?\\ }|[^%s{}]|\\ \\ [{}])+?)\\ }" , pathSeparator , pathSeparator ));
708
+ String pattern = "\\ ?|\\ *|\\ {((?:\\ {[^" + pathSeparator + "]+?\\ }|[^" + pathSeparator + "{}]|\\ \\ [{}])+?)\\ }" ;
709
+ return Pattern .compile (pattern );
709
710
}
710
711
711
712
private String quote (String s , int start , int end ) {
You can’t perform that action at this time.
0 commit comments