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:
[email protected]