pan3793 commented on code in PR #5967:
URL: https://github.com/apache/kyuubi/pull/5967#discussion_r1450166217
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala:
##########
@@ -73,4 +73,8 @@ package object kyuubi {
val BUILD_USER: String = BuildInfo.user
val REPO_URL: String = BuildInfo.repoUrl
val BUILD_DATE: String = BuildInfo.buildDate
+
+ private def getProperty(props: Properties, key: String, defaultValue:
String): String = {
+ Option(props.getProperty(key,
defaultValue)).filterNot(_.isEmpty).getOrElse(defaultValue)
+ }
Review Comment:
we don't need to make it generic, move it to `BuildInfo` body and simply
write as
```suggestion
private def getProperty(key: String, defaultValue: String = unknown):
String = {
Option(props.getProperty(key,
defaultValue)).filterNot(_.isEmpty).getOrElse(defaultValue)
}
```
--
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]