From 29d28ec846395b8aa51aab613cd8d3195dde67d4 Mon Sep 17 00:00:00 2001 From: hongwei Date: Fri, 15 Sep 2023 09:13:05 +0200 Subject: [PATCH] refactor/use val instead of def for gitCommit method --- obp-api/src/main/scala/code/api/util/APIUtil.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obp-api/src/main/scala/code/api/util/APIUtil.scala b/obp-api/src/main/scala/code/api/util/APIUtil.scala index 48ee9cacdc..f8469d92cd 100644 --- a/obp-api/src/main/scala/code/api/util/APIUtil.scala +++ b/obp-api/src/main/scala/code/api/util/APIUtil.scala @@ -448,7 +448,7 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{ /* Return the git commit. If we can't for some reason (not a git root etc) then log and return "" */ - def gitCommit : String = { + lazy val gitCommit : String = { val commit = try { val properties = new java.util.Properties() logger.debug("Before getResourceAsStream git.properties")