You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/23 04:05:21 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #9033: Add spotbugs checks for pulsar-client-api module

BewareMyPower opened a new pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033


   ### Motivation
   
   Add spotbugs plugin for pulsar-client-api module.
   
   ### Modifications
   
   The most potential bugs are related to the raw array's getter/setter/constructor, so we replace the default access with `clone()` access except the `SchemaInfo` that is only created with a builder.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   


----------------------------------------------------------------
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] [pulsar] sijie merged pull request #9033: Add spotbug checks for pulsar-client-api module

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033


   


----------------------------------------------------------------
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] [pulsar] codelipenghui commented on pull request #9033: Add spotbug checks for pulsar-client-api module

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033#issuecomment-750300685


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] [pulsar] eolivelli commented on a change in pull request #9033: Add spotbug checks for pulsar-client-api module

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033#discussion_r547878261



##########
File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/EncryptionKeyInfo.java
##########
@@ -39,16 +39,16 @@ public EncryptionKeyInfo() {
     }
 
     public EncryptionKeyInfo(byte[] key, Map<String, String> metadata) {
-        this.key = key;
+        this.key = key.clone();

Review comment:
       IMO it is better to add a suppresswarnings here and do not clone the array.
   Even if we are not in an hot path




----------------------------------------------------------------
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] [pulsar] BewareMyPower commented on pull request #9033: Add spotbug checks for pulsar-client-api module

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033#issuecomment-750690262


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] [pulsar] BewareMyPower commented on a change in pull request #9033: Add spotbug checks for pulsar-client-api module

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on a change in pull request #9033:
URL: https://github.com/apache/pulsar/pull/9033#discussion_r547880039



##########
File path: pulsar-client-api/src/main/java/org/apache/pulsar/client/api/EncryptionKeyInfo.java
##########
@@ -39,16 +39,16 @@ public EncryptionKeyInfo() {
     }
 
     public EncryptionKeyInfo(byte[] key, Map<String, String> metadata) {
-        this.key = key;
+        this.key = key.clone();

Review comment:
       OK, I'll ignore the setter/getter of the array.




----------------------------------------------------------------
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