Skip to content

FIX gRPC-related URL object caused a NullPointerException (NPE)#15157

Merged
AlbumenJ merged 3 commits intoapache:3.3from
RainYuY:FIX-Service-NPE
Feb 21, 2025
Merged

FIX gRPC-related URL object caused a NullPointerException (NPE)#15157
AlbumenJ merged 3 commits intoapache:3.3from
RainYuY:FIX-Service-NPE

Conversation

@RainYuY
Copy link
Copy Markdown
Member

@RainYuY RainYuY commented Feb 18, 2025

What is the purpose of the change?

fix issue #15108

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.70%. Comparing base (437d38c) to head (321c2c7).
Report is 13 commits behind head on 3.3.

Files with missing lines Patch % Lines
...tocol/tri/h12/AbstractServerTransportListener.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15157      +/-   ##
============================================
- Coverage     60.74%   60.70%   -0.04%     
- Complexity    10880    10881       +1     
============================================
  Files          1884     1884              
  Lines         86050    86055       +5     
  Branches      12893    12894       +1     
============================================
- Hits          52268    52242      -26     
- Misses        28333    28359      +26     
- Partials       5449     5454       +5     
Flag Coverage Δ
integration-tests 33.08% <71.42%> (+<0.01%) ⬆️
samples-tests 29.18% <0.00%> (-0.03%) ⬇️
unit-tests 58.81% <71.42%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RainYuY
Copy link
Copy Markdown
Member Author

RainYuY commented Feb 18, 2025

PTAL @AlbumenJ @CrazyHZM

Comment thread dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java Outdated
Comment on lines +284 to +288
ExtensionLoader<HeaderFilter> headerFilterExtensionLoader =
frameworkModel.getExtensionLoader(HeaderFilter.class);
headerFilters = headerFilterExtensionLoader
.getActivateExtension(invoker.getUrl(), HEADER_FILTERS_CACHE)
.toArray(new HeaderFilter[0]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will load success here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, I've already verified it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the different between
image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right, they are no different. I just didn't notice that this piece of code caused me to write exactly the same code.

@AlbumenJ AlbumenJ merged commit d4c1fb3 into apache:3.3 Feb 21, 2025
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.

3 participants