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#6595] fix NPE and repeat access key log #6596
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6596 +/- ##
=============================================
+ Coverage 43.10% 43.13% +0.03%
+ Complexity 8996 8992 -4
=============================================
Files 1107 1107
Lines 78287 78289 +2
Branches 10202 10203 +1
=============================================
+ Hits 33745 33771 +26
+ Misses 40314 40291 -23
+ Partials 4228 4227 -1
... and 25 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
if (aclPlainAccessResourceMap.get(aclFileName) == null || | ||
aclPlainAccessResourceMap.get(aclFileName).get(plainAccessResource.getAccessKey()) == null) { |
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.
You'd better extract aclPlainAccessResourceMap.get(aclFileName)
as a variable so that the code would be more clear.
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.
thanks for your suggestion, i will adjust it
PlainAccessResource ownedAccess = aclPlainAccessResourceMap.get(aclFileName).get(plainAccessResource.getAccessKey()); | ||
if (null == ownedAccess) { | ||
if (aclPlainAccessResourceMap.get(aclFileName) == null || | ||
aclPlainAccessResourceMap.get(aclFileName).get(plainAccessResource.getAccessKey()) == null) { |
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.
you can try getOrDefault() to reduce one time's get from map
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.
thanks for your suggestion, i will adjust it
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
The request is stale, and we already have enough approves.
Make sure set the target branch to
develop
What is the purpose of the change
fix #6595
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.