-
Notifications
You must be signed in to change notification settings - Fork 85
fix: fix api path tree building #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
============================================
+ Coverage 19.79% 19.85% +0.05%
- Complexity 946 950 +4
============================================
Files 375 375
Lines 15598 15607 +9
Branches 1998 2001 +3
============================================
+ Hits 3088 3099 +11
Misses 12125 12125
+ Partials 385 383 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // 跳过第一个为空的str | ||
| TrieNode<String> node = root; | ||
| // 一些场景下(例如dubbo的接口名是com.tencent.polaris.serviceName),apiPath 不以"/"开头和分割,则直接构造node | ||
| if (apiPaths.length == 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果path是/,那么apiPaths是什么样的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiPaths.length为0,仅返回根节点
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里会有个情况是,/path会和path生成同样的树结构。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要补充多点单测用例,来保证正确。
| // 跳过第一个为空的str | ||
| TrieNode<String> node = root; | ||
| // 一些场景下(例如dubbo的接口名是com.tencent.polaris.serviceName),apiPath 不以"/"开头和分割,则直接构造node | ||
| if (apiPaths.length == 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要补充多点单测用例,来保证正确。
701ea8c to
d628c92
Compare
No description provided.