From 3e3723ed8f860eaab59084021c2a37b66ffb03da Mon Sep 17 00:00:00 2001 From: "A. Anil Sinaci" Date: Tue, 14 Jan 2025 10:05:38 +0300 Subject: [PATCH] :sparkles: Feat. Add heap size configuration as an environment variable to docker run. Advance embedded mongo version to fix the ubuntu build. --- docker/docker-entrypoint.sh | 9 ++++++++- .../main/scala/io/onfhir/path/FhirPathAggFunctions.scala | 2 +- pom.xml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 60fa41b8..f191c746 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,6 +1,13 @@ #!/usr/bin/env bash -JAVA_CMD="java -Xms256m -Xmx3g -jar " +# Set default Java options +DEFAULT_JAVA_OPTIONS="-Xms256m -Xmx3g" + +# Use environment variable if provided, otherwise use default value +JAVA_OPTIONS="${JAVA_OPTIONS:-$DEFAULT_JAVA_OPTIONS}" + +# Construct JAVA_CMD with Java options +JAVA_CMD="java $JAVA_OPTIONS -jar " # Configure application.conf path if [ ! -z "$APP_CONF_FILE" ]; then diff --git a/onfhir-path/src/main/scala/io/onfhir/path/FhirPathAggFunctions.scala b/onfhir-path/src/main/scala/io/onfhir/path/FhirPathAggFunctions.scala index 2440fe04..f39970a5 100644 --- a/onfhir-path/src/main/scala/io/onfhir/path/FhirPathAggFunctions.scala +++ b/onfhir-path/src/main/scala/io/onfhir/path/FhirPathAggFunctions.scala @@ -142,7 +142,7 @@ class FhirPathAggFunctions(context:FhirPathEnvironment, current:Seq[FhirPathResu .flatMap(c => { val result = new FhirPathExpressionEvaluator(context, Seq(c)).visit(expr) if (result.length > 1) - throw new FhirPathException(s"Invalid function call 'min', the expression ${expr.getText} does not return a single value or Nil!") + throw new FhirPathException(s"Invalid function call 'max', the expression ${expr.getText} does not return a single value or Nil!") result.headOption }) diff --git a/pom.xml b/pom.xml index 77765bf7..0733af46 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ 2.8.5 5.1.3 - 4.12.0 + 4.18.1 3.7.0-M11 2.2.0 1.4.14