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

Apply p3c pmd plugin/rules and fix/ignore all violations of priority 1 #574

Merged
merged 3 commits into from
Mar 15, 2019

Conversation

blindpirate
Copy link
Contributor

@blindpirate blindpirate commented Mar 14, 2019

Describe what this PR does / why we need it

This PR applies alibaba p3c pmd plugin/rules and fixes all violations of priority 1.

Does this pull request fix one issue?

Fixes #573

Describe how you did it

Just fix all violations.

Describe how to verify it

mvn clean install -DskipTests -DminimumPriority=1

Special notes for reviews

@codecov-io
Copy link

Codecov Report

Merging #574 into master will increase coverage by 0.41%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #574      +/-   ##
============================================
+ Coverage     38.74%   39.16%   +0.41%     
- Complexity     1216     1225       +9     
============================================
  Files           275      275              
  Lines          8702     8702              
  Branches       1163     1163              
============================================
+ Hits           3372     3408      +36     
+ Misses         4900     4853      -47     
- Partials        430      441      +11
Impacted Files Coverage Δ Complexity Δ
.../sentinel/cluster/client/NettyTransportClient.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...inel/cluster/server/connection/ConnectionPool.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...a/csp/sentinel/slots/system/SystemRuleManager.java 43.79% <ø> (ø) 8 <0> (ø) ⬇️
.../csp/sentinel/slots/block/degrade/DegradeRule.java 55.55% <ø> (ø) 17 <0> (ø) ⬇️
...csp/sentinel/slots/block/flow/FlowRuleManager.java 60.86% <ø> (ø) 7 <0> (ø) ⬇️
...a/csp/sentinel/slots/statistic/base/LongAdder.java 31.91% <0%> (+14.89%) 10% <0%> (+6%) ⬆️
...a/csp/sentinel/slots/statistic/base/Striped64.java 56.25% <0%> (+30.2%) 8% <0%> (+3%) ⬆️

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 0d4c47b...cd45eb3. Read the comment docs.

@blindpirate
Copy link
Contributor Author

Seems like some tests are behaving flaky: WarmUpRateLimiterControllerTest and OccupiableBucketLeapArrayTest. With nearly same code, 1st build and 2nd build fail but 3rd build succeeds.

Are there any known issues? Please let me know if you need me to investigate.

@sczyh30 sczyh30 added the to-review To review label Mar 15, 2019
@sczyh30
Copy link
Member

sczyh30 commented Mar 15, 2019

Seems like some tests are behaving flaky: WarmUpRateLimiterControllerTest and OccupiableBucketLeapArrayTest. With nearly same code, 1st build and 2nd build fail but 3rd build succeeds.

Are there any known issues? Please let me know if you need me to investigate.

It's a known issue that some sleep-based test cases are not stable. See #541 for discussion.

@blindpirate
Copy link
Contributor Author

Thanks! @sczyh30

Copy link
Member

@sczyh30 sczyh30 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 a336937 into alibaba:master Mar 15, 2019
@sczyh30
Copy link
Member

sczyh30 commented Mar 15, 2019

Thanks for contributing!

@sczyh30 sczyh30 removed the to-review To review label Mar 15, 2019
@blindpirate
Copy link
Contributor Author

Thanks!

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.

Follow alibaba coding guidelines
3 participants