From 3c8ee86a9ab06682afc45505845b7594700091af Mon Sep 17 00:00:00 2001 From: Venkata Saidurga Polamraju Date: Wed, 17 Jul 2024 18:26:17 +0530 Subject: [PATCH] [ES-1347] Signed-off-by: Venkata Saidurga Polamraju --- .../main/java/io/mosip/esignet/services/CacheUtilService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oidc-service-impl/src/main/java/io/mosip/esignet/services/CacheUtilService.java b/oidc-service-impl/src/main/java/io/mosip/esignet/services/CacheUtilService.java index 0d2fa18fa..e36e7da59 100644 --- a/oidc-service-impl/src/main/java/io/mosip/esignet/services/CacheUtilService.java +++ b/oidc-service-impl/src/main/java/io/mosip/esignet/services/CacheUtilService.java @@ -128,7 +128,9 @@ public String blockIndividualId(String individualIdHash) { @CachePut(value = Constants.PRE_AUTH_SESSION_CACHE, key = "#transactionId") public OIDCTransaction updateIndividualIdHashInPreAuthCache(String transactionId, String individualId) { OIDCTransaction oidcTransaction = cacheManager.getCache(Constants.PRE_AUTH_SESSION_CACHE).get(transactionId, OIDCTransaction.class);//NOSONAR getCache() will not be returning null here. - oidcTransaction.setIndividualIdHash(IdentityProviderUtil.generateB64EncodedHash(ALGO_SHA3_256, individualId)); + if (oidcTransaction != null) { + oidcTransaction.setIndividualIdHash(IdentityProviderUtil.generateB64EncodedHash(ALGO_SHA3_256, individualId)); + } return oidcTransaction; }