-
Notifications
You must be signed in to change notification settings - Fork 640
[ISSUE #3106] Null check for dataContentMap in HttpProtocolAdaptor.java #3131
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
[ISSUE #3106] Null check for dataContentMap in HttpProtocolAdaptor.java #3131
Conversation
|
@PreetAngadSingh |
|
Thanks @mike_xwm
I will do the changes by the end of the day today.
…On Mon, Feb 13, 2023 at 7:05 AM, mike_xwm ***@***.***> wrote:
@PreetAngadSingh <https://github.com/PreetAngadSingh>
[image: image]
<https://user-images.githubusercontent.com/13237619/218453270-c47a9199-4af4-4f8e-a5ca-4243d5f6ddae.png>
please check these errors
—
Reply to this email directly, view it on GitHub
<#3131 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALGBJBP7MQLHRX7PHWCVZETWXIPQ3ANCNFSM6AAAAAAUZZVPYE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@PreetAngadSingh Hello,you can refer to the figure below, the NPE of the Headers does not seem to be under control. |
Codecov Report
@@ Coverage Diff @@
## master #3131 +/- ##
============================================
- Coverage 13.10% 13.09% -0.02%
Complexity 1145 1145
============================================
Files 548 548
Lines 28630 28623 -7
Branches 2862 2858 -4
============================================
- Hits 3751 3747 -4
+ Misses 24556 24552 -4
- Partials 323 324 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
mytang0
left a comment
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.
LGTM


Fixes #3106
Method:
public static T requireNonNull(T obj, String message)
The Objects.requireNonNull() method is used to check that the values associated with the keys CONSTANTS_KEY_HEADERS and CONSTANTS_KEY_BODY are not null before calling the JsonUtils.serialize and getBytes methods on them. If either of the values is null, the method throws a NullPointerException with the specified error message.
line 105 : added requireNonNull method and message "Headers must not be null");
line 106 : added requireNonNull method and message "Bodymust not be null");