Unified toPath method (#2754)

This commit is contained in:
于玉桔 2019-05-25 13:27:27 +08:00 committed by 吴晟 Wu Sheng
parent b625d8a170
commit e0827e30ea
1 changed files with 3 additions and 2 deletions

View File

@ -77,8 +77,9 @@ public class SynchronousDispatcherInterceptor implements InstanceMethodsAroundIn
}
private static String toPath(String uri) {
if (uri.contains("?")) {
return uri.substring(0, uri.indexOf("?"));
int index = uri.indexOf("?");
if (index > -1) {
return uri.substring(0, index);
} else {
return uri;
}