anmolnar commented on code in PR #2289: URL: https://github.com/apache/zookeeper/pull/2289#discussion_r2252784327
########## zookeeper-server/src/main/java/org/apache/zookeeper/common/ZKConfig.java: ########## @@ -146,6 +155,21 @@ public String getProperty(String key) { return properties.get(key); } + /** + * Get the property value and call String.trim() on it if not null + * + * @param key + * @return property value + */ + public String getTrimmedProperty(String key) { + String property = getProperty(key); + if (property != null) { + return property.trim(); + } else { + return property; + } Review Comment: nit: ```java return property != null ? property.trim() : ""; ``` You don't need the null check in this case. -- 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: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org