adoroszlai commented on a change in pull request #436:
URL: https://github.com/apache/ratis/pull/436#discussion_r589267508



##########
File path: ratis-grpc/src/main/java/org/apache/ratis/grpc/GrpcTlsConfig.java
##########
@@ -75,14 +77,23 @@ public boolean getMtlsEnabled() {
   }
 
   public GrpcTlsConfig(PrivateKey privateKey, X509Certificate certChain,
-      X509Certificate trustStore, boolean mTlsEnabled) {
+      List<X509Certificate> trustStore, boolean mTlsEnabled) {
     this.privateKey = privateKey;
     this.certChain = certChain;
     this.trustStore = trustStore;
     this.mTlsEnabled = mTlsEnabled;
     this.fileBasedConfig = false;
   }
 
+  public GrpcTlsConfig(PrivateKey privateKey, X509Certificate certChain,
+      X509Certificate trustStore, boolean mTlsEnabled) {
+    this.privateKey = privateKey;
+    this.certChain = certChain;
+    this.trustStore = Arrays.asList(trustStore);

Review comment:
       Suggestion: use `Collections.singletonList` instead of `Arrays.asList`.




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


Reply via email to