提交 c2fb936a 编写于 作者: sinat_25235033's avatar sinat_25235033

modify and pass the test

上级 6be3fa74
......@@ -105,7 +105,7 @@ public class TirePathTree {
Node current = root;
String matchRole;
for(Map.Entry<String, Node> entry : current.getChildren().entrySet()) {
matchRole = searchPathRole(entry.getValue(), urlPac, 0, method);
matchRole = searchPathRole(entry.getValue(), urlPac, 0, method);
if (matchRole != null) {
return matchRole;
}
......
......@@ -34,6 +34,8 @@ public class TirePathTreeTest {
public void buildTree() {
Set<String> paths = new HashSet<>();
paths.add("/api///v2//book//===get===[]");
paths.add("/api///v2////book/////2/===get===[]");
paths.add("/////api///////v2//book/////===get===[]");
paths.add("/api/v2/host===post===[role2,role3,role4]");
paths.add("/api/v2/host===get===[role2,role3,role4]");
paths.add("/api/v2/host===get===[role2,role3]");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册