Skip to content
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

Fix the NPE bug when passing null args and paramIdx is negative #642

Merged
merged 1 commit into from
Apr 4, 2019

Conversation

sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Apr 2, 2019

Describe what this PR does / why we need it

Fix the NPE bug when passing null args to SphU.entry(xxx, args) and paramIdx of parameter flow rule is negative (< 0).

Does this pull request fix one issue?

Fixes #643

Describe how you did it

Check null args in checkParams. Also rearrange some code in ParamFlowSlot.

Describe how to verify it

Run the test cases.

Special notes for reviews

NONE

- Also rearrangement of some code

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
@sczyh30 sczyh30 added the to-review To review label Apr 2, 2019
@codecov-io
Copy link

Codecov Report

Merging #642 into master will increase coverage by 0.51%.
The diff coverage is 86.36%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #642      +/-   ##
============================================
+ Coverage     40.06%   40.57%   +0.51%     
- Complexity     1293     1307      +14     
============================================
  Files           284      284              
  Lines          8916     8919       +3     
  Branches       1192     1192              
============================================
+ Hits           3572     3619      +47     
+ Misses         4887     4835      -52     
- Partials        457      465       +8
Impacted Files Coverage Δ Complexity Δ
...sentinel/slots/block/flow/param/ParamFlowSlot.java 81.25% <86.36%> (+2.56%) 22 <8> (+2) ⬆️
...a/csp/sentinel/slots/statistic/base/LeapArray.java 67.64% <0%> (-2.95%) 33% <0%> (-1%)
...ibaba/csp/sentinel/eagleeye/EagleEyeLogDaemon.java 30.3% <0%> (+6.06%) 6% <0%> (+1%) ⬆️
...a/csp/sentinel/slots/statistic/base/LongAdder.java 34.04% <0%> (+17.02%) 11% <0%> (+7%) ⬆️
...a/csp/sentinel/slots/statistic/base/Striped64.java 61.45% <0%> (+35.41%) 11% <0%> (+6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3eb4a37...7dbe45a. Read the comment docs.

@sczyh30 sczyh30 added this to the 1.6.0 milestone Apr 2, 2019
Copy link
Contributor

@CarpenterLee CarpenterLee left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit 29f22e3 into master Apr 4, 2019
@sczyh30 sczyh30 deleted the bug/null-args-in-param-slot branch April 4, 2019 01:40
@sczyh30 sczyh30 removed the to-review To review label Apr 8, 2019
blindpirate pushed a commit to blindpirate/Sentinel that referenced this pull request Apr 10, 2019
…s negative (alibaba#642)

- Also rearrangement of some code

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
sczyh30 added a commit that referenced this pull request Apr 17, 2019
…s negative (#642)

- Also rearrangement of some code

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
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.

NPE bug when passing null args to SphU.entry(xxx, args) and paramIdx is negative
3 participants