From 4119f30cf18ef8c209ce3246c06df54a03fb43e4 Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Fri, 14 Jun 2024 13:26:18 +0530 Subject: [PATCH 1/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/validator/impl/BiometricsSignatureValidator.java | 4 ++-- .../quality/classifier/stage/QualityClassifierStage.java | 4 ++-- .../status/service/impl/AnonymousProfileServiceImpl.java | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java index 78498a63154..fd741c135cd 100644 --- a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java +++ b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java @@ -75,8 +75,8 @@ public void validateSignature(String id, String process, BiometricRecord biometr List birs = biometricRecord.getSegments(); for (BIR bir : birs) { Map othersInfo = null; - if (bir.getOthers() instanceof Map) { - othersInfo = (Map) bir.getOthers(); + if (bir.getOthers() instanceof HashMap othersInfo1) { + othersInfo = othersInfo1; } if (othersInfo == null) { throw new BiometricSignatureValidationException("Others value is null inside BIR"); diff --git a/registration-processor/pre-processor/registration-processor-quality-classifier-stage/src/main/java/io/mosip/registration/processor/quality/classifier/stage/QualityClassifierStage.java b/registration-processor/pre-processor/registration-processor-quality-classifier-stage/src/main/java/io/mosip/registration/processor/quality/classifier/stage/QualityClassifierStage.java index 92119deef87..191b01e6eda 100644 --- a/registration-processor/pre-processor/registration-processor-quality-classifier-stage/src/main/java/io/mosip/registration/processor/quality/classifier/stage/QualityClassifierStage.java +++ b/registration-processor/pre-processor/registration-processor-quality-classifier-stage/src/main/java/io/mosip/registration/processor/quality/classifier/stage/QualityClassifierStage.java @@ -424,8 +424,8 @@ private Map getQualityTags(List birs) throws BiometricExcep if (bir.getOthers() != null) { Map othersInfo = null; - if (bir.getOthers() instanceof Map) { - othersInfo = (Map) bir.getOthers(); + if (bir.getOthers() instanceof HashMap othersInfo1) { + othersInfo = othersInfo1; } boolean exceptionValue = false; if(othersInfo!=null) { diff --git a/registration-processor/registration-processor-registration-status-service-impl/src/main/java/io/mosip/registration/processor/status/service/impl/AnonymousProfileServiceImpl.java b/registration-processor/registration-processor-registration-status-service-impl/src/main/java/io/mosip/registration/processor/status/service/impl/AnonymousProfileServiceImpl.java index a36077bc8cd..0f94d9759dc 100644 --- a/registration-processor/registration-processor-registration-status-service-impl/src/main/java/io/mosip/registration/processor/status/service/impl/AnonymousProfileServiceImpl.java +++ b/registration-processor/registration-processor-registration-status-service-impl/src/main/java/io/mosip/registration/processor/status/service/impl/AnonymousProfileServiceImpl.java @@ -7,6 +7,7 @@ import java.util.Arrays; import java.util.Date; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -278,8 +279,8 @@ private void getExceptionAndBiometricInfo(BiometricRecord biometricRecord, Anony List birs = biometricRecord.getSegments(); for (BIR bir : birs) { Map othersInfo = null; - if (bir.getOthers() instanceof Map) { - othersInfo = (Map) bir.getOthers(); + if (bir.getOthers() instanceof HashMap othersInfo1) { + othersInfo = othersInfo1; } if (othersInfo == null) { From c567f2401d104ae0a0a91c6001d10620d7e8b3dc Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Fri, 14 Jun 2024 16:07:26 +0530 Subject: [PATCH 2/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/validator/impl/BiometricsSignatureValidator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java index fd741c135cd..0aa2efa126e 100644 --- a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java +++ b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java @@ -73,8 +73,11 @@ public void validateSignature(String id, String process, BiometricRecord biometr } List birs = biometricRecord.getSegments(); + for (BIR bir : birs) { Map othersInfo = null; + regProcLogger.info(LoggerFileConstant.REGISTRATIONID.toString(), id, + bir.toString()); if (bir.getOthers() instanceof HashMap othersInfo1) { othersInfo = othersInfo1; } From 2f7cbc44bbc815459ea05f00ce9dd18ca908d544 Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Fri, 14 Jun 2024 18:57:26 +0530 Subject: [PATCH 3/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/validator/impl/BiometricsSignatureValidator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java index 0aa2efa126e..602a46ff243 100644 --- a/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java +++ b/registration-processor/pre-processor/registration-processor-packet-validator-stage/src/main/java/io/mosip/registration/processor/stages/validator/impl/BiometricsSignatureValidator.java @@ -35,6 +35,7 @@ import io.mosip.registration.processor.core.constant.JsonConstant; import io.mosip.registration.processor.core.exception.ApisResourceAccessException; import io.mosip.registration.processor.core.exception.PacketManagerException; +import io.mosip.registration.processor.core.exception.util.PlatformSuccessMessages; import io.mosip.registration.processor.core.packet.dto.FieldValue; import io.mosip.registration.processor.core.packet.dto.JWTSignatureVerifyRequestDto; import io.mosip.registration.processor.core.packet.dto.JWTSignatureVerifyResponseDto; @@ -76,7 +77,8 @@ public void validateSignature(String id, String process, BiometricRecord biometr for (BIR bir : birs) { Map othersInfo = null; - regProcLogger.info(LoggerFileConstant.REGISTRATIONID.toString(), id, + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + id, bir.toString()); if (bir.getOthers() instanceof HashMap othersInfo1) { othersInfo = othersInfo1;