chibenwa commented on code in PR #3240:
URL: https://github.com/apache/james-project/pull/3240#discussion_r4192231781


##########
server/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPConfiguration.java:
##########
@@ -114,11 +119,62 @@ public Builder maximumSendSize(Optional<Long> 
maximumSendSize) {
             return this;
         }
 
+        public Builder keystore(String keystore) {
+            this.keystore = Optional.ofNullable(keystore).filter(s -> 
!s.isEmpty());
+            return this;
+        }
+
+        public Builder keystore(Optional<String> keystore) {
+            this.keystore = keystore.filter(s -> !s.isEmpty());
+            return this;
+        }
+
+        public Builder keystoreType(String keystoreType) {
+            this.keystoreType = Optional.ofNullable(keystoreType).filter(s -> 
!s.isEmpty());
+            return this;
+        }
+
+        public Builder keystoreType(Optional<String> keystoreType) {
+            this.keystoreType = keystoreType.filter(s -> !s.isEmpty());
+            return this;
+        }
+
+        public Builder privateKey(String privateKey) {
+            this.privateKey = Optional.ofNullable(privateKey).filter(s -> 
!s.isEmpty());
+            return this;
+        }
+
+        public Builder privateKey(Optional<String> privateKey) {
+            this.privateKey = privateKey.filter(s -> !s.isEmpty());
+            return this;
+        }
+
+        public Builder certificates(String certificates) {
+            this.certificates = Optional.ofNullable(certificates).filter(s -> 
!s.isEmpty());
+            return this;
+        }
+
+        public Builder certificates(Optional<String> certificates) {
+            this.certificates = certificates.filter(s -> !s.isEmpty());
+            return this;
+        }
+
+        public Builder secret(String secret) {
+            this.secret = Optional.ofNullable(secret).filter(s -> 
!s.isEmpty());
+            return this;
+        }
+
+        public Builder secret(Optional<String> secret) {
+            this.secret = secret.filter(s -> !s.isEmpty());
+            return this;
+        }
+
         public JMAPConfiguration build() {
             Preconditions.checkState(enabled.isPresent(), "You should specify 
if JMAP server should be started");

Review Comment:
   Mixing keystore and pem constructs should fail
   Enabling TLS without a complete keystore or pem should fail
   Here
   With explicit messages



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to