-
Couldn't load subscription status.
- 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.82% 19.84% +0.02%
- Complexity 942 944 +2
============================================
Files 373 373
Lines 15566 15570 +4
Branches 1994 1995 +1
============================================
+ Hits 3086 3090 +4
- Misses 12097 12098 +1
+ Partials 383 382 -1 ☔ 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.
需要补充多点单测用例,来保证正确。
No description provided.