You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/11/10 18:34:40 UTC

[GitHub] [geode-benchmarks] bschuchardt commented on a change in pull request #135: Adds peer to peer benchmarks.

bschuchardt commented on a change in pull request #135:
URL: https://github.com/apache/geode-benchmarks/pull/135#discussion_r520748233



##########
File path: geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/GeodeProperties.java
##########
@@ -90,15 +96,27 @@ public static Properties withSecurityManager(Properties properties) {
 
   public static Properties withSsl(Properties properties) {
     properties.setProperty(SSL_ENABLED_COMPONENTS, ALL);
+    final String withSslProtocols = System.getProperty(WITH_SSL_PROTOCOLS_PROPERTY);
+    if (!isBlank(withSslProtocols)) {
+      properties.setProperty(SSL_PROTOCOLS, withSslProtocols);
+    }
+    final String withSslCiphers = System.getProperty(WITH_SSL_CIPHERS_PROPERTY);
+    if (!isBlank(withSslCiphers)) {
+      properties.setProperty(SSL_CIPHERS, withSslCiphers);
+    }
     return properties;
   }
 
+  private static boolean isBlank(final String value) {
+    return null == value || value.isEmpty() && value.trim().isEmpty();

Review comment:
       just use (null == value || value.trim().isEmpty()).  If value.isEmpty() then value.trim().isEmpty() will always be true.




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