Skip to content

Conversation

@fuyuwei01
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.84%. Comparing base (f55af1e) to head (1952120).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...n/java/com/tencent/polaris/api/utils/TrieUtil.java 0.00% 3 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// 跳过第一个为空的str
TrieNode<String> node = root;
// 一些场景下(例如dubbo的接口名是com.tencent.polaris.serviceName),apiPath 不以"/"开头和分割,则直接构造node
if (apiPaths.length == 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果path是/,那么apiPaths是什么样的?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apiPaths.length为0,仅返回根节点

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会有个情况是,/path会和path生成同样的树结构。

Copy link
Member

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要补充多点单测用例,来保证正确。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants