frankgh commented on code in PR #38:
URL: 
https://github.com/apache/cassandra-analytics/pull/38#discussion_r1482923367


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/BulkSparkConf.java:
##########
@@ -128,12 +128,13 @@ public class BulkSparkConf implements Serializable
     protected boolean useOpenSsl;
     protected int ringRetryCount;
     protected final Set<String> blockedInstances;
+    protected final DigestTypeOption digestTypeOption;
 
     public BulkSparkConf(SparkConf conf, Map<String, String> options)
     {
         this.conf = conf;
         Optional<Integer> sidecarPortFromOptions = 
MapUtils.getOptionalInt(options, WriterOptions.SIDECAR_PORT.name(), "sidecar 
port");
-        this.userProvidedSidecarPort = sidecarPortFromOptions.isPresent() ? 
sidecarPortFromOptions.get() : getOptionalInt(SIDECAR_PORT).orElse(-1);
+        this.userProvidedSidecarPort = sidecarPortFromOptions.orElseGet(() -> 
getOptionalInt(SIDECAR_PORT).orElse(-1));

Review Comment:
   I actually prefer the orElseGet approach here. But I will revert since it's 
not related to this PR



-- 
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: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to