vvysotskyi commented on a change in pull request #2012: DRILL-7625: Add options
for SslContextFactory
URL: https://github.com/apache/drill/pull/2012#discussion_r388271496
##########
File path:
common/src/main/java/org/apache/drill/common/config/NestedConfig.java
##########
@@ -111,6 +111,14 @@ public String getString(String path) {
return c.getString(path);
}
+ public String getString(String path, String defaultValue) {
+ String value = hasPath(path) ? getString(path) : null;
+ if (value == null || (value = value.trim()).isEmpty()) {
+ return defaultValue;
+ }
+ return value;
Review comment:
Nit: May be used `StringUtils.defaultIfBlank)` method to simplify this code.
----------------------------------------------------------------
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]
With regards,
Apache Git Services