You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/05/14 07:16:46 UTC

[GitHub] [rocketmq] shendongsd opened a new pull request #2893: fix the problem of potential NPE in ACL plain

shendongsd opened a new pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893


   [#2863]  fix the problem of potential NPE in ACL plain and revise codeStyle
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-841070160


   
   [![Coverage Status](https://coveralls.io/builds/39845793/badge)](https://coveralls.io/builds/39845793)
   
   Coverage increased (+1.5%) to 53.897% when pulling **7af4307d737e2eeea1d75b675255976049aae03b on shendongsd:develop** into **be6eaf858cf5e98bee072353f6580572d652951d on apache:develop**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] codecov-commenter commented on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-844860613


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2893](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cd183b8) into [develop](https://codecov.io/gh/apache/rocketmq/commit/be6eaf858cf5e98bee072353f6580572d652951d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (be6eaf8) will **increase** coverage by `1.22%`.
   > The diff coverage is `56.25%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2893/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2893      +/-   ##
   =============================================
   + Coverage      46.67%   47.89%   +1.22%     
   - Complexity      4418     4541     +123     
   =============================================
     Files            552      552              
     Lines          36500    36514      +14     
     Branches        4828     4833       +5     
   =============================================
   + Hits           17035    17489     +454     
   + Misses         17344    16803     -541     
   - Partials        2121     2222     +101     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...che/rocketmq/acl/plain/PlainPermissionManager.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvcGxhaW4vUGxhaW5QZXJtaXNzaW9uTWFuYWdlci5qYXZh) | `68.32% <56.25%> (-1.91%)` | `39.00 <0.00> (ø)` | |
   | [...e/rocketmq/client/impl/consumer/RebalanceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VJbXBsLmphdmE=) | `40.63% <0.00%> (-15.94%)` | `31.00% <0.00%> (-6.00%)` | |
   | [...apache/rocketmq/client/trace/TraceDataEncoder.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VEYXRhRW5jb2Rlci5qYXZh) | `55.48% <0.00%> (-14.84%)` | `7.00% <0.00%> (-4.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `71.11% <0.00%> (-8.89%)` | `8.00% <0.00%> (-2.00%)` | |
   | [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `71.15% <0.00%> (-7.70%)` | `10.00% <0.00%> (-1.00%)` | |
   | [...ain/java/org/apache/rocketmq/test/util/MQWait.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RV2FpdC5qYXZh) | `54.05% <0.00%> (-5.41%)` | `4.00% <0.00%> (ø%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `64.86% <0.00%> (-2.71%)` | `19.00% <0.00%> (-1.00%)` | |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `59.13% <0.00%> (-2.16%)` | `25.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/client/trace/TraceContext.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VDb250ZXh0LmphdmE=) | `72.91% <0.00%> (-2.09%)` | `18.00% <0.00%> (-1.00%)` | |
   | [...va/org/apache/rocketmq/client/trace/TraceBean.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VCZWFuLmphdmE=) | `96.07% <0.00%> (-1.97%)` | `28.00% <0.00%> (-1.00%)` | |
   | ... and [26 more](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [be6eaf8...cd183b8](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-841070160


   
   [![Coverage Status](https://coveralls.io/builds/39846909/badge)](https://coveralls.io/builds/39846909)
   
   Coverage increased (+1.4%) to 53.82% when pulling **cd183b8ddaba365f2b309db6fae3f14b88760aa7 on shendongsd:develop** into **be6eaf858cf5e98bee072353f6580572d652951d on apache:develop**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] shendongsd commented on a change in pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
shendongsd commented on a change in pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#discussion_r635722412



##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -50,9 +50,9 @@
 
     private String fileName = System.getProperty("rocketmq.acl.plain.file", DEFAULT_PLAIN_ACL_FILE);
 
-    private  Map<String/** AccessKey **/, PlainAccessResource> plainAccessResourceMap = new HashMap<>();
+    private Map<String/** AccessKey **/, PlainAccessResource> plainAccessResourceMap = new HashMap<>();

Review comment:
       > Do you check your style correct, just like here.?#2899
   
   yes, i checked




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky merged pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
duhenglucky merged pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] codecov-commenter edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-844860613


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2893](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e320775) into [develop](https://codecov.io/gh/apache/rocketmq/commit/be6eaf858cf5e98bee072353f6580572d652951d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (be6eaf8) will **increase** coverage by `1.19%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2893/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2893      +/-   ##
   =============================================
   + Coverage      46.67%   47.86%   +1.19%     
   - Complexity      4418     4538     +120     
   =============================================
     Files            552      552              
     Lines          36500    36524      +24     
     Branches        4828     4834       +6     
   =============================================
   + Hits           17035    17481     +446     
   + Misses         17344    16817     -527     
   - Partials        2121     2226     +105     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...che/rocketmq/acl/plain/PlainPermissionManager.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvcGxhaW4vUGxhaW5QZXJtaXNzaW9uTWFuYWdlci5qYXZh) | `68.32% <50.00%> (-1.91%)` | `39.00 <0.00> (ø)` | |
   | [.../broker/subscription/SubscriptionGroupManager.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9icm9rZXIvc3Vic2NyaXB0aW9uL1N1YnNjcmlwdGlvbkdyb3VwTWFuYWdlci5qYXZh) | `54.11% <0.00%> (-16.48%)` | `8.00% <0.00%> (-3.00%)` | |
   | [...e/rocketmq/client/impl/consumer/RebalanceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VJbXBsLmphdmE=) | `40.23% <0.00%> (-16.34%)` | `30.00% <0.00%> (-7.00%)` | |
   | [...ain/java/org/apache/rocketmq/test/util/MQWait.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RV2FpdC5qYXZh) | `43.24% <0.00%> (-16.22%)` | `3.00% <0.00%> (-1.00%)` | |
   | [...apache/rocketmq/client/trace/TraceDataEncoder.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VEYXRhRW5jb2Rlci5qYXZh) | `55.12% <0.00%> (-15.20%)` | `7.00% <0.00%> (-4.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `71.11% <0.00%> (-8.89%)` | `8.00% <0.00%> (-2.00%)` | |
   | [...org/apache/rocketmq/common/stats/StatsItemSet.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jb21tb24vc3RhdHMvU3RhdHNJdGVtU2V0LmphdmE=) | `46.26% <0.00%> (-5.98%)` | `18.00% <0.00%> (-2.00%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `64.86% <0.00%> (-2.71%)` | `19.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/client/trace/TraceContext.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VDb250ZXh0LmphdmE=) | `72.91% <0.00%> (-2.09%)` | `18.00% <0.00%> (-1.00%)` | |
   | [...va/org/apache/rocketmq/client/trace/TraceBean.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VCZWFuLmphdmE=) | `96.07% <0.00%> (-1.97%)` | `28.00% <0.00%> (-1.00%)` | |
   | ... and [25 more](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [be6eaf8...e320775](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls commented on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-841070160


   
   [![Coverage Status](https://coveralls.io/builds/39686696/badge)](https://coveralls.io/builds/39686696)
   
   Coverage increased (+0.09%) to 52.473% when pulling **b219c161b78be6d9c0a7877c914ea81c720e1d12 on shendongsd:develop** into **be6eaf858cf5e98bee072353f6580572d652951d on apache:develop**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-841070160


   
   [![Coverage Status](https://coveralls.io/builds/39845003/badge)](https://coveralls.io/builds/39845003)
   
   Coverage increased (+1.7%) to 54.04% when pulling **4f48fb74dc2fcb389710653148ba4c08fe00205d on shendongsd:develop** into **be6eaf858cf5e98bee072353f6580572d652951d on apache:develop**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] ShannonDing commented on a change in pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
ShannonDing commented on a change in pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#discussion_r636579404



##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -133,7 +133,9 @@ public boolean updateAccessConfig(PlainAccessConfig plainAccessConfig) {
 
         Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
             Map.class);
-
+        if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) {
+            throw new AclException(String.format("%s file not found or empty", fileHome + File.separator + fileName));

Review comment:
       "the xxx file  **is** not found or empty " seems better.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] codecov-commenter edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-844860613


   # [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2893](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cd183b8) into [develop](https://codecov.io/gh/apache/rocketmq/commit/be6eaf858cf5e98bee072353f6580572d652951d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (be6eaf8) will **increase** coverage by `1.22%`.
   > The diff coverage is `56.25%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/rocketmq/pull/2893/graphs/tree.svg?width=650&height=150&src=pr&token=4w0sxP1wZv&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #2893      +/-   ##
   =============================================
   + Coverage      46.67%   47.89%   +1.22%     
   - Complexity      4418     4541     +123     
   =============================================
     Files            552      552              
     Lines          36500    36514      +14     
     Branches        4828     4833       +5     
   =============================================
   + Hits           17035    17489     +454     
   + Misses         17344    16803     -541     
   - Partials        2121     2222     +101     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...che/rocketmq/acl/plain/PlainPermissionManager.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YWNsL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9hY2wvcGxhaW4vUGxhaW5QZXJtaXNzaW9uTWFuYWdlci5qYXZh) | `68.32% <56.25%> (-1.91%)` | `39.00 <0.00> (ø)` | |
   | [...e/rocketmq/client/impl/consumer/RebalanceImpl.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9SZWJhbGFuY2VJbXBsLmphdmE=) | `40.63% <0.00%> (-15.94%)` | `31.00% <0.00%> (-6.00%)` | |
   | [...apache/rocketmq/client/trace/TraceDataEncoder.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VEYXRhRW5jb2Rlci5qYXZh) | `55.48% <0.00%> (-14.84%)` | `7.00% <0.00%> (-4.00%)` | |
   | [...ketmq/client/impl/consumer/PullMessageService.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9QdWxsTWVzc2FnZVNlcnZpY2UuamF2YQ==) | `71.11% <0.00%> (-8.89%)` | `8.00% <0.00%> (-2.00%)` | |
   | [...org/apache/rocketmq/store/ha/WaitNotifyObject.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3RvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3JvY2tldG1xL3N0b3JlL2hhL1dhaXROb3RpZnlPYmplY3QuamF2YQ==) | `71.15% <0.00%> (-7.70%)` | `10.00% <0.00%> (-1.00%)` | |
   | [...ain/java/org/apache/rocketmq/test/util/MQWait.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvdGVzdC91dGlsL01RV2FpdC5qYXZh) | `54.05% <0.00%> (-5.41%)` | `4.00% <0.00%> (ø%)` | |
   | [...client/consumer/store/RemoteBrokerOffsetStore.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvY29uc3VtZXIvc3RvcmUvUmVtb3RlQnJva2VyT2Zmc2V0U3RvcmUuamF2YQ==) | `64.86% <0.00%> (-2.71%)` | `19.00% <0.00%> (-1.00%)` | |
   | [...a/org/apache/rocketmq/filter/util/BloomFilter.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmlsdGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9maWx0ZXIvdXRpbC9CbG9vbUZpbHRlci5qYXZh) | `59.13% <0.00%> (-2.16%)` | `25.00% <0.00%> (-1.00%)` | |
   | [...org/apache/rocketmq/client/trace/TraceContext.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VDb250ZXh0LmphdmE=) | `72.91% <0.00%> (-2.09%)` | `18.00% <0.00%> (-1.00%)` | |
   | [...va/org/apache/rocketmq/client/trace/TraceBean.java](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvdHJhY2UvVHJhY2VCZWFuLmphdmE=) | `96.07% <0.00%> (-1.97%)` | `28.00% <0.00%> (-1.00%)` | |
   | ... and [26 more](https://codecov.io/gh/apache/rocketmq/pull/2893/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [be6eaf8...cd183b8](https://codecov.io/gh/apache/rocketmq/pull/2893?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky commented on a change in pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
duhenglucky commented on a change in pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#discussion_r636574736



##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -164,20 +166,21 @@ public boolean updateAccessConfig(PlainAccessConfig plainAccessConfig) {
         return false;
     }
 
-    private Map<String, Object> createAclAccessConfigMap(Map<String, Object> existedAccountMap, PlainAccessConfig plainAccessConfig) {
-        
+    private Map<String, Object> createAclAccessConfigMap(Map<String, Object> existedAccoutMap,
+        PlainAccessConfig plainAccessConfig) {
+
         Map<String, Object> newAccountsMap = null;
-        if (existedAccountMap == null) {
+        if (existedAccoutMap == null) {

Review comment:
       accout -> account 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] vongosling commented on a change in pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
vongosling commented on a change in pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#discussion_r634902460



##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -50,9 +50,9 @@
 
     private String fileName = System.getProperty("rocketmq.acl.plain.file", DEFAULT_PLAIN_ACL_FILE);
 
-    private  Map<String/** AccessKey **/, PlainAccessResource> plainAccessResourceMap = new HashMap<>();
+    private Map<String/** AccessKey **/, PlainAccessResource> plainAccessResourceMap = new HashMap<>();

Review comment:
       Do you check your style correct, just like here.?https://github.com/apache/rocketmq/pull/2899

##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -73,14 +73,14 @@ public void load() {
         JSONObject plainAclConfData = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
             JSONObject.class);
         if (plainAclConfData == null || plainAclConfData.isEmpty()) {
-            throw new AclException(String.format("%s file is not data", fileHome + File.separator + fileName));
+            throw new AclException(String.format("%s file  is not data", fileHome + File.separator + fileName));

Review comment:
       the middle of file and is has two blanks, right?

##########
File path: acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionManager.java
##########
@@ -133,7 +133,9 @@ public boolean updateAccessConfig(PlainAccessConfig plainAccessConfig) {
 
         Map<String, Object> aclAccessConfigMap = AclUtils.getYamlDataObject(fileHome + File.separator + fileName,
             Map.class);
-
+        if (aclAccessConfigMap == null || aclAccessConfigMap.isEmpty()) {
+            throw new AclException(String.format("%s file  is not data", fileHome + File.separator + fileName));

Review comment:
       what is file is not data, is it right sematic?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] coveralls edited a comment on pull request #2893: fix the problem of potential NPE in ACL plain

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #2893:
URL: https://github.com/apache/rocketmq/pull/2893#issuecomment-841070160


   
   [![Coverage Status](https://coveralls.io/builds/39880235/badge)](https://coveralls.io/builds/39880235)
   
   Coverage increased (+1.7%) to 54.099% when pulling **e320775aa6dbb2f6cfdb95163a63bfb3e8f2bab9 on shendongsd:develop** into **be6eaf858cf5e98bee072353f6580572d652951d on apache:develop**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org