From 6f90ebe9b070bcaa781ba438932145fea8c053d7 Mon Sep 17 00:00:00 2001 From: Victor Romero Date: Sun, 2 Aug 2026 20:31:22 -0600 Subject: [PATCH] FINERACT-2734: Upgrade to JDK 25 LTS --- .../setup-and-build-fineract/action.yml | 4 ++-- .github/workflows/build-cucumber.yml | 4 ++-- .github/workflows/build-docker.yml | 4 ++-- .github/workflows/build-documentation.yml | 4 ++-- .github/workflows/build-e2e-tests.yml | 4 ++-- .github/workflows/build-mariadb.yml | 4 ++-- .github/workflows/build-mysql.yml | 4 ++-- .github/workflows/build-postgresql.yml | 4 ++-- .github/workflows/build-progressive-loan.yml | 4 ++-- .github/workflows/build-quality-checks.yml | 20 +++++++++---------- .../workflows/liquibase-only-postgresql.yml | 4 ++-- .github/workflows/publish-dockerhub.yml | 4 ++-- .../regression-safety-db-changes.yml | 4 ++-- ...tegration-test-sequentially-postgresql.yml | 4 ++-- .github/workflows/smoke-messaging.yml | 4 ++-- .github/workflows/sonarqube.yml | 4 ++-- .../verify-api-backward-compatibility.yml | 4 ++-- ...erated-client-api-method-compatibility.yml | 4 ++-- ...erify-liquibase-backward-compatibility.yml | 4 ++-- build.gradle | 8 ++++---- .../gradle/service/TemplateService.groovy | 3 ++- custom/docker/build.gradle | 2 +- fineract-command/REFACTORING.md | 2 +- .../GoogleGsonSerializerHelper.java | 2 +- .../batch/service/ResolutionHelperTest.java | 2 ++ .../docs/en/chapters/command/refactoring.adoc | 2 +- fineract-provider/build.gradle | 2 +- ...mpaignWritePlatformCommandHandlerImpl.java | 4 ++-- ...ailOutboundWithCampaignMessageTasklet.java | 4 ++-- ...msCampaignWritePlatformServiceJpaImpl.java | 4 ++-- .../TwoFactorConfigurationServiceImpl.java | 4 ++-- .../service/TemplateMergeServiceImpl.java | 6 +++--- 32 files changed, 70 insertions(+), 67 deletions(-) diff --git a/.github/actions/setup-and-build-fineract/action.yml b/.github/actions/setup-and-build-fineract/action.yml index 4d2c6e731b3..0011dc05aa9 100644 --- a/.github/actions/setup-and-build-fineract/action.yml +++ b/.github/actions/setup-and-build-fineract/action.yml @@ -12,10 +12,10 @@ inputs: runs: using: composite steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Setup Gradle and Validate Wrapper diff --git a/.github/workflows/build-cucumber.yml b/.github/workflows/build-cucumber.yml index 877ed7af731..29874e1cceb 100644 --- a/.github/workflows/build-cucumber.yml +++ b/.github/workflows/build-cucumber.yml @@ -19,10 +19,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index ce682b7236a..c5e4e52d86c 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -29,10 +29,10 @@ jobs: DOCKER_LOG_DIR: ci-logs/docker-${{ matrix.db_type }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 3ea38083bc0..f776fd64525 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -13,10 +13,10 @@ jobs: env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace id: download-workspace diff --git a/.github/workflows/build-e2e-tests.yml b/.github/workflows/build-e2e-tests.yml index da37addd62d..293e98800d7 100644 --- a/.github/workflows/build-e2e-tests.yml +++ b/.github/workflows/build-e2e-tests.yml @@ -38,10 +38,10 @@ jobs: ACTIVEMQ_TOPIC_NAME: events steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index ac554e41d86..905d6daf09b 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -37,10 +37,10 @@ jobs: FINERACT_TEST_EXTERNAL_HOST: host.docker.internal steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-mysql.yml b/.github/workflows/build-mysql.yml index b76f21a0931..c9d363d4f7c 100644 --- a/.github/workflows/build-mysql.yml +++ b/.github/workflows/build-mysql.yml @@ -37,10 +37,10 @@ jobs: FINERACT_TEST_EXTERNAL_HOST: host.docker.internal steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-postgresql.yml b/.github/workflows/build-postgresql.yml index 26c4700e75b..c90463a3c69 100644 --- a/.github/workflows/build-postgresql.yml +++ b/.github/workflows/build-postgresql.yml @@ -37,10 +37,10 @@ jobs: FINERACT_TEST_EXTERNAL_HOST: host.docker.internal steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-progressive-loan.yml b/.github/workflows/build-progressive-loan.yml index 85beeaefe5b..0762be1783b 100644 --- a/.github/workflows/build-progressive-loan.yml +++ b/.github/workflows/build-progressive-loan.yml @@ -19,10 +19,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/build-quality-checks.yml b/.github/workflows/build-quality-checks.yml index cead5937de0..42b5e362269 100644 --- a/.github/workflows/build-quality-checks.yml +++ b/.github/workflows/build-quality-checks.yml @@ -19,10 +19,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace @@ -78,10 +78,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace @@ -137,10 +137,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace @@ -196,10 +196,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace @@ -255,10 +255,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/liquibase-only-postgresql.yml b/.github/workflows/liquibase-only-postgresql.yml index 36f320686ef..647023fb2f9 100644 --- a/.github/workflows/liquibase-only-postgresql.yml +++ b/.github/workflows/liquibase-only-postgresql.yml @@ -29,10 +29,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/publish-dockerhub.yml b/.github/workflows/publish-dockerhub.yml index 74625aa1479..4682bdf13db 100644 --- a/.github/workflows/publish-dockerhub.yml +++ b/.github/workflows/publish-dockerhub.yml @@ -27,10 +27,10 @@ jobs: env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/regression-safety-db-changes.yml b/.github/workflows/regression-safety-db-changes.yml index 876d18fe922..49f7fd54fa9 100644 --- a/.github/workflows/regression-safety-db-changes.yml +++ b/.github/workflows/regression-safety-db-changes.yml @@ -125,11 +125,11 @@ jobs: fetch-depth: 0 path: baseline - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: distribution: 'zulu' - java-version: '21' + java-version: '25' - name: Download workspace id: download-workspace diff --git a/.github/workflows/run-integration-test-sequentially-postgresql.yml b/.github/workflows/run-integration-test-sequentially-postgresql.yml index e9d9a9bd5dd..1597f5bda39 100644 --- a/.github/workflows/run-integration-test-sequentially-postgresql.yml +++ b/.github/workflows/run-integration-test-sequentially-postgresql.yml @@ -42,10 +42,10 @@ jobs: TZ: Asia/Kolkata DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace id: download-workspace diff --git a/.github/workflows/smoke-messaging.yml b/.github/workflows/smoke-messaging.yml index 4f819e2f01f..04422b2b2fb 100644 --- a/.github/workflows/smoke-messaging.yml +++ b/.github/workflows/smoke-messaging.yml @@ -29,10 +29,10 @@ jobs: DOCKER_LOG_DIR: ci-logs/smoke-${{ matrix.messaging }} steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index f1d3972667f..643053af61c 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -38,10 +38,10 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} JAVA_BINARIES: . steps: - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: - java-version: '21' + java-version: '25' distribution: 'zulu' - name: Download workspace id: download-workspace diff --git a/.github/workflows/verify-api-backward-compatibility.yml b/.github/workflows/verify-api-backward-compatibility.yml index 87ce0dec4ad..2ebe722702f 100644 --- a/.github/workflows/verify-api-backward-compatibility.yml +++ b/.github/workflows/verify-api-backward-compatibility.yml @@ -57,11 +57,11 @@ jobs: git merge --no-commit --no-ff FETCH_HEAD - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: distribution: 'zulu' - java-version: '21' + java-version: '25' - name: Generate baseline spec working-directory: baseline diff --git a/.github/workflows/verify-generated-client-api-method-compatibility.yml b/.github/workflows/verify-generated-client-api-method-compatibility.yml index 6024d3c6e4d..4bc39d88a9a 100644 --- a/.github/workflows/verify-generated-client-api-method-compatibility.yml +++ b/.github/workflows/verify-generated-client-api-method-compatibility.yml @@ -58,11 +58,11 @@ jobs: git merge --no-commit --no-ff FETCH_HEAD - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: distribution: 'zulu' - java-version: '21' + java-version: '25' - name: Generate baseline client working-directory: baseline diff --git a/.github/workflows/verify-liquibase-backward-compatibility.yml b/.github/workflows/verify-liquibase-backward-compatibility.yml index c5728c0acf3..ef5ebe43d46 100644 --- a/.github/workflows/verify-liquibase-backward-compatibility.yml +++ b/.github/workflows/verify-liquibase-backward-compatibility.yml @@ -45,11 +45,11 @@ jobs: fetch-depth: 0 path: baseline - - name: Set up JDK 21 + - name: Set up JDK 25 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5 with: distribution: 'zulu' - java-version: '21' + java-version: '25' - name: Download workspace id: download-workspace diff --git a/build.gradle b/build.gradle index 19eeb7f2ab7..5a5f23eb714 100644 --- a/build.gradle +++ b/build.gradle @@ -210,7 +210,7 @@ allprojects { "SameNameButDifferent", // Until errorprone recognizes Lombok "MultiVariableDeclaration", // Until errorprone recognizes Lombok "UnnecessaryDefaultInEnumSwitch", // FINERACT-1911 - "StringConcatToTextBlock", // Error Prone 2.49.0 crashes on JDK 21, raised issue: https://github.com/google/error-prone/issues/5815 + "StringConcatToTextBlock", // Error Prone 2.49.0 crashes on JDK 25, raised issue: https://github.com/google/error-prone/issues/5815 "AssertEqualsArgumentOrderChecker", "RemoveUnusedImports" // For generated code ) @@ -398,7 +398,7 @@ configure(project.fineractJavaProjects) { java { toolchain { - languageVersion = JavaLanguageVersion.of(21) + languageVersion = JavaLanguageVersion.of(25) } withSourcesJar() withJavadocJar() @@ -444,8 +444,8 @@ configure(project.fineractJavaProjects) { configurations.named('spotbugs').configure { resolutionStrategy.eachDependency { if (it.requested.group == 'org.ow2.asm') { - it.useVersion '9.5' - it.because "Asm 9.5 is required for JDK 21 support" + it.useVersion '9.8' + it.because "Asm 9.8 is required for JDK 25 support" } } } diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy index bcb8f72650a..52c94e62b90 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy @@ -18,6 +18,7 @@ */ package org.apache.fineract.gradle.service +import java.io.Reader; import freemarker.core.Environment import freemarker.template.Configuration import freemarker.template.Template @@ -63,7 +64,7 @@ class TemplateService { template = new Template("template", new FileReader(new File(params.templateFile), Charset.forName("UTF-8")), this.config) } if(params.template) { - template = new Template("template", new StringReader(params.template), this.config) + template = new Template("template", Reader.of(params.template), this.config) } if(template) { diff --git a/custom/docker/build.gradle b/custom/docker/build.gradle index ad505fa6fb6..c41164b16ac 100644 --- a/custom/docker/build.gradle +++ b/custom/docker/build.gradle @@ -24,7 +24,7 @@ apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencie jib { from { - image = 'azul/zulu-openjdk-alpine:21' + image = 'azul/zulu-openjdk-alpine:25' platforms { platform { architecture = System.getProperty("os.arch").equals("aarch64")?"arm64":"amd64" diff --git a/fineract-command/REFACTORING.md b/fineract-command/REFACTORING.md index c2d2ff4f82d..f8d0b7d1d11 100644 --- a/fineract-command/REFACTORING.md +++ b/fineract-command/REFACTORING.md @@ -319,7 +319,7 @@ This is the default execution mode. Performance is to be expected on par with th 2. **Skip**: Async Execution -Already included in the current implementation. Just needs a proper **configuration** in **application.properties** (see unit tests). One thing that might need some additional coding: the use of **thread local variables in multi threaded environments** needs some special care to properly work (we use this to identify the current tenant). Also: we should upgrade to JDK 21 and make use of virtual threads (very easy in Spring Boot, simple configuration property). This allows for massive parallel execution that is not bound by physical CPU cores without (take this with a pinch of salt) performance penalties (read: use millions of threads). +Already included in the current implementation. Just needs a proper **configuration** in **application.properties** (see unit tests). One thing that might need some additional coding: the use of **thread local variables in multi threaded environments** needs some special care to properly work (we use this to identify the current tenant). Also: we should upgrade to JDK 25 and make use of virtual threads (very easy in Spring Boot, simple configuration property). This allows for massive parallel execution that is not bound by physical CPU cores without (take this with a pinch of salt) performance penalties (read: use millions of threads). 3. **Skip**: Non-blocking Execution diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java index 1d2b9d56f0b..0aee2534812 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java @@ -105,7 +105,7 @@ public static GsonBuilder createGsonBuilder() { public static void registerTypeAdapters(final GsonBuilder builder) { builder.registerTypeAdapter(java.util.Date.class, new DateAdapter()); builder.registerTypeAdapter(LocalDate.class, new LocalDateAdapter()); - // NOTE: was missing, necessary for GSON serialization with JDK 21's restrictive module access + // NOTE: was missing, necessary for GSON serialization with JDK 25's restrictive module access builder.registerTypeAdapter(LocalTime.class, new LocalTimeAdapter()); builder.registerTypeAdapter(ZonedDateTime.class, new JodaDateTimeAdapter()); builder.registerTypeAdapter(MonthDay.class, new JodaMonthDayAdapter()); diff --git a/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java b/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java index fcccb567d14..0e9623b5590 100644 --- a/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java @@ -28,6 +28,7 @@ import com.jayway.jsonpath.ReadContext; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; import org.apache.fineract.batch.exception.BatchReferenceInvalidException; @@ -108,6 +109,7 @@ void testResolveRequestWithNoDependencies() { @Test void testResolveRequestWithArrayDateParameter() { + Locale.setDefault(Locale.ENGLISH); // Test resolving a JSON primitive with array date format BatchRequest batchRequest = new BatchRequest(); batchRequest diff --git a/fineract-doc/src/docs/en/chapters/command/refactoring.adoc b/fineract-doc/src/docs/en/chapters/command/refactoring.adoc index ebbd757ea3b..5f67c32b3ee 100644 --- a/fineract-doc/src/docs/en/chapters/command/refactoring.adoc +++ b/fineract-doc/src/docs/en/chapters/command/refactoring.adoc @@ -210,7 +210,7 @@ This is the default execution mode. Performance is to be expected on par with th === **Skip**: Async Execution -Already included in the current implementation. Just needs a proper **configuration** in **application.properties** (see unit tests). One thing that might need some additional coding: the use of **thread local variables in multi threaded environments** needs some special care to properly work (we use this to identify the current tenant). Also: we should upgrade to JDK 21 and make use of virtual threads (very easy in Spring Boot, simple configuration property). This allows for massive parallel execution that is not bound by physical CPU cores without (take this with a pinch of salt) performance penalties (read: use millions of threads). +Already included in the current implementation. Just needs a proper **configuration** in **application.properties** (see unit tests). One thing that might need some additional coding: the use of **thread local variables in multi threaded environments** needs some special care to properly work (we use this to identify the current tenant). Also: we should upgrade to JDK 25 and make use of virtual threads (very easy in Spring Boot, simple configuration property). This allows for massive parallel execution that is not bound by physical CPU cores without (take this with a pinch of salt) performance penalties (read: use millions of threads). === **Skip**: Non-blocking Execution diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 9043db3e9fe..2592ec1e57e 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -313,7 +313,7 @@ bootJar { jib { from { - image = 'azul/zulu-openjdk-alpine:21' + image = 'azul/zulu-openjdk-alpine:25' platforms { platform { architecture = System.getProperty("os.arch").equals("aarch64")?"arm64":"amd64" diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java index 1bf4d7d8685..fd271464877 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java @@ -27,7 +27,7 @@ import jakarta.mail.internet.AddressException; import jakarta.mail.internet.InternetAddress; import java.io.IOException; -import java.io.StringReader; +import java.io.Reader; import java.io.StringWriter; import java.time.LocalDate; import java.time.LocalDateTime; @@ -345,7 +345,7 @@ public CommandProcessingResult closeEmailCampaign(Long campaignId, JsonCommand c private String compileEmailTemplate(final String textMessageTemplate, final String campaignName, final Map emailParams) { final MustacheFactory mf = new DefaultMustacheFactory(); - final Mustache mustache = mf.compile(new StringReader(textMessageTemplate), campaignName); + final Mustache mustache = mf.compile(Reader.of(textMessageTemplate), campaignName); final StringWriter stringWriter = new StringWriter(); mustache.execute(stringWriter, emailParams); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java index 2a3f6964730..3db51a08197 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java @@ -26,7 +26,7 @@ import jakarta.mail.internet.AddressException; import jakarta.mail.internet.InternetAddress; import java.io.IOException; -import java.io.StringReader; +import java.io.Reader; import java.io.StringWriter; import java.time.LocalDateTime; import java.util.Collection; @@ -127,7 +127,7 @@ private void updateTriggerDates(Long campaignId) { private String compileEmailTemplate(final String textMessageTemplate, final String campaignName, final Map emailParams) { final MustacheFactory mf = new DefaultMustacheFactory(); - final Mustache mustache = mf.compile(new StringReader(textMessageTemplate), campaignName); + final Mustache mustache = mf.compile(Reader.of(textMessageTemplate), campaignName); final StringWriter stringWriter = new StringWriter(); mustache.execute(stringWriter, emailParams); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java index 695466680bb..dd8cde1605e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java @@ -26,7 +26,7 @@ import com.github.mustachejava.MustacheFactory; import com.google.gson.JsonElement; import java.io.IOException; -import java.io.StringReader; +import java.io.Reader; import java.io.StringWriter; import java.time.LocalDate; import java.time.LocalDateTime; @@ -455,7 +455,7 @@ public CommandProcessingResult closeSmsCampaign(Long campaignId, JsonCommand com @Override public String compileSmsTemplate(final String textMessageTemplate, final String campaignName, final Map smsParams) { final MustacheFactory mf = new DefaultMustacheFactory(); - final Mustache mustache = mf.compile(new StringReader(textMessageTemplate), campaignName); + final Mustache mustache = mf.compile(Reader.of(textMessageTemplate), campaignName); final StringWriter stringWriter = new StringWriter(); mustache.execute(stringWriter, smsParams); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java index 1ff0c008d43..0f6c8aa2fe9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java @@ -21,7 +21,7 @@ import com.github.mustachejava.DefaultMustacheFactory; import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; -import java.io.StringReader; +import java.io.Reader; import java.io.StringWriter; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -279,7 +279,7 @@ private Map processTemplateDataFor(AppUser user, OTPRequest requ private String compileTextTemplate(final String template, final String name, final Map params) { final MustacheFactory mf = new DefaultMustacheFactory(); - final Mustache mustache = mf.compile(new StringReader(template), name); + final Mustache mustache = mf.compile(Reader.of(template), name); final StringWriter stringWriter = new StringWriter(); mustache.execute(stringWriter, params); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeServiceImpl.java index e484401ee02..d06b11999f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeServiceImpl.java @@ -24,7 +24,7 @@ import com.github.mustachejava.MustacheFactory; import java.io.IOException; import java.io.InputStream; -import java.io.StringReader; +import java.io.Reader; import java.io.StringWriter; import java.net.Authenticator; import java.net.HttpURLConnection; @@ -65,7 +65,7 @@ public String compile(final TemplateData template, final Map sco scopes.put("static", TemplateFunctions.INSTANCE); var mf = new DefaultMustacheFactory(); - var mustache = mf.compile(new StringReader(template.getText()), template.getName()); + var mustache = mf.compile(Reader.of(template.getText()), template.getName()); compiledMapFromMappers(asMap(template.getMappers()), scopes); @@ -82,7 +82,7 @@ private void compiledMapFromMappers(final Map data, final Map entry : data.entrySet()) { - final Mustache mappersMustache = mf.compile(new StringReader(entry.getValue()), ""); + final Mustache mappersMustache = mf.compile(Reader.of(entry.getValue()), ""); final StringWriter stringWriter = new StringWriter(); mappersMustache.execute(stringWriter, scopes);