From 08529e15729b4bcc60c61e88c93dbf7b030689a0 Mon Sep 17 00:00:00 2001 From: Aiham Hasan <89243555+aihamh@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:56:47 +0530 Subject: [PATCH] [MOSIP-32507] Java21: Updated code (#687) * updated pom Signed-off-by: Aiham * Updated code Signed-off-by: Aiham --------- Signed-off-by: Aiham --- .../application/PreRegistrationApplication.java | 5 +++-- .../application/service/util/DemographicServiceUtil.java | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/PreRegistrationApplication.java b/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/PreRegistrationApplication.java index 849e25be58..aea6c291fa 100644 --- a/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/PreRegistrationApplication.java +++ b/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/PreRegistrationApplication.java @@ -2,12 +2,13 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor; import org.springframework.cache.annotation.EnableCaching; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.FilterType; @EnableCaching -@SpringBootApplication +@SpringBootApplication(exclude = CloudFoundryVcapEnvironmentPostProcessor.class) @ComponentScan(basePackages = { "io.mosip.*", "${mosip.lang.traslate.adapter.impl.basepackage}" }, excludeFilters = { @ComponentScan.Filter(type = FilterType.REGEX, pattern = { "io\\.mosip\\.kernel\\.keymigrate\\.service\\.spi\\.KeyMigratorService", @@ -22,4 +23,4 @@ public class PreRegistrationApplication { public static void main(String[] args) { SpringApplication.run(PreRegistrationApplication.class, args); } -} \ No newline at end of file +} diff --git a/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/DemographicServiceUtil.java b/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/DemographicServiceUtil.java index 699447a565..e627bd0d19 100644 --- a/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/DemographicServiceUtil.java +++ b/pre-registration/pre-registration-application-service/src/main/java/io/mosip/preregistration/application/service/util/DemographicServiceUtil.java @@ -544,9 +544,8 @@ public String getJson(String filename) { log.error(LOGGER_SESSIONID, LOGGER_IDTYPE, LOGGER_ID, ExceptionUtils.getStackTrace(ex)); log.error(LOGGER_SESSIONID, LOGGER_IDTYPE, LOGGER_ID, "In pre-registration service util of getPreregistrationIdentityJson- " + ex.getMessage()); -// throw new SystemFileIOException(DemographicErrorCodes.PRG_PAM_APP_018.getCode(), -// DemographicErrorMessages.UBALE_TO_READ_IDENTITY_JSON.getMessage(), null); - return null; + throw new SystemFileIOException(DemographicErrorCodes.PRG_PAM_APP_018.getCode(), + DemographicErrorMessages.UBALE_TO_READ_IDENTITY_JSON.getMessage(), null); } }