pan3793 commented on code in PR #5967:
URL: https://github.com/apache/kyuubi/pull/5967#discussion_r1450120471
##########
kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala:
##########
@@ -51,11 +51,15 @@ package object kyuubi {
val hadoop_version: String = props.getProperty("kyuubi_hadoop_version",
unknown)
val flink_version: String = props.getProperty("kyuubi_flink_version",
unknown)
val trino_version: String = props.getProperty("kyuubi_trino_version",
unknown)
- val branch: String = props.getProperty("branch", unknown)
- val revision: String = props.getProperty("revision", unknown)
- val revisionTime: String = props.getProperty("revision_time", unknown)
+ val branch: String = Option(props.getProperty("branch", unknown))
+ .filterNot(_.isEmpty).getOrElse(unknown)
Review Comment:
let extract a method and guard all properties
--
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]