@@ -1030,8 +1030,7 @@ public int matches(RoutingContextImplBase context, String mountPoint, boolean fa
1030
1030
if (!exactPath ) {
1031
1031
context .matchRest = m .start ("rest" );
1032
1032
// always replace
1033
- context .pathParams ()
1034
- .put ("*" , path .substring (context .matchRest ));
1033
+ context .addOrReplacePathParam ("*" , path .substring (context .matchRest ));
1035
1034
}
1036
1035
1037
1036
if (!isEmpty (groups )) {
@@ -1162,8 +1161,7 @@ private boolean pathMatches(String mountPoint, RoutingContext ctx) {
1162
1161
1163
1162
if (exactPath ) {
1164
1163
// exact path has no "rest"
1165
- ctx .pathParams ()
1166
- .remove ("*" );
1164
+ ctx .removePathParam ("*" );
1167
1165
1168
1166
return pathMatchesExact (thePath , requestPath , pathEndsWithSlash );
1169
1167
} else {
@@ -1184,17 +1182,16 @@ private boolean pathMatches(String mountPoint, RoutingContext ctx) {
1184
1182
// because the mount path ended with a wildcard we are relaxed in the check
1185
1183
if (thePath .regionMatches (0 , requestPath , 0 , pathLen - 1 )) {
1186
1184
// handle the "rest" as path param *, always known to be empty
1187
- ctx .pathParams ()
1188
- .put ("*" , "/" );
1185
+ ctx .addOrReplacePathParam ("*" , "/" );
1189
1186
return true ;
1190
1187
}
1191
1188
}
1192
1189
}
1193
1190
1194
1191
if (requestPath .startsWith (thePath )) {
1195
1192
// handle the "rest" as path param *
1196
- ctx .pathParams ()
1197
- . put ( "*" , URIDecoder .decodeURIComponent (requestPath .substring (thePath .length ()), false ));
1193
+ ctx .addOrReplacePathParam ( "*" ,
1194
+ URIDecoder .decodeURIComponent (requestPath .substring (thePath .length ()), false ));
1198
1195
return true ;
1199
1196
}
1200
1197
return false ;
@@ -1267,7 +1264,7 @@ private void addPathParam(RoutingContext context, String name, String value) {
1267
1264
if (!request .params ().contains (name )) {
1268
1265
request .params ().add (name , decodedValue );
1269
1266
}
1270
- context .pathParams (). put (name , decodedValue );
1267
+ context .addOrReplacePathParam (name , decodedValue );
1271
1268
}
1272
1269
1273
1270
boolean hasNextContextHandler (RoutingContextImplBase context ) {
0 commit comments