From e56e7568417a41831fa8632615b787f455b7b004 Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Mon, 17 Jun 2024 11:12:52 +0530 Subject: [PATCH 1/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/validator/impl/BiometricsSignatureValidator.java | 2 ++ 1 file changed, 2 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 602a46ff243..70468ac4a6e 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 @@ -80,6 +80,8 @@ public void validateSignature(String id, String process, BiometricRecord biometr regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), id, bir.toString()); + regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), + id, bir.getOthers()); if (bir.getOthers() instanceof HashMap othersInfo1) { othersInfo = othersInfo1; } From 6a758977d4fcb6967abac43d34be41ca19eb62fc Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Mon, 17 Jun 2024 15:53:07 +0530 Subject: [PATCH 2/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../validator/impl/BiometricsSignatureValidator.java | 10 +--------- .../classifier/stage/QualityClassifierStage.java | 5 +---- .../service/impl/AnonymousProfileServiceImpl.java | 6 +----- 3 files changed, 3 insertions(+), 18 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 70468ac4a6e..f6ff6f7decb 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 @@ -76,15 +76,7 @@ public void validateSignature(String id, String process, BiometricRecord biometr List birs = biometricRecord.getSegments(); for (BIR bir : birs) { - Map othersInfo = null; - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - id, - bir.toString()); - regProcLogger.info(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.REGISTRATIONID.toString(), - id, bir.getOthers()); - if (bir.getOthers() instanceof HashMap othersInfo1) { - othersInfo = othersInfo1; - } + HashMap othersInfo = bir.getOthers() 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 191b01e6eda..3097773a25a 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 @@ -423,10 +423,7 @@ private Map getQualityTags(List birs) throws BiometricExcep for (BIR bir : birs) { if (bir.getOthers() != null) { - Map othersInfo = null; - if (bir.getOthers() instanceof HashMap othersInfo1) { - othersInfo = othersInfo1; - } + HashMap othersInfo = bir.getOthers(); boolean exceptionValue = false; if(othersInfo!=null) { for (Map.Entry other : othersInfo.entrySet()) { 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 0f94d9759dc..7e8fb6bde86 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 @@ -278,11 +278,7 @@ private void getExceptionAndBiometricInfo(BiometricRecord biometricRecord, Anony List birs = biometricRecord.getSegments(); for (BIR bir : birs) { - Map othersInfo = null; - if (bir.getOthers() instanceof HashMap othersInfo1) { - othersInfo = othersInfo1; - } - + HashMap othersInfo = bir.getOthers(); if (othersInfo == null) { continue; } From 3241d529b4dda78a51c837a90b007e3b7a9feda8 Mon Sep 17 00:00:00 2001 From: Sowmya Ujjappa Banakar Date: Mon, 17 Jun 2024 16:02:31 +0530 Subject: [PATCH 3/3] MOSIP-32461 code changes Signed-off-by: Sowmya Ujjappa Banakar --- .../stages/validator/impl/BiometricsSignatureValidator.java | 2 +- 1 file changed, 1 insertion(+), 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 f6ff6f7decb..8197219055f 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 @@ -76,7 +76,7 @@ public void validateSignature(String id, String process, BiometricRecord biometr List birs = biometricRecord.getSegments(); for (BIR bir : birs) { - HashMap othersInfo = bir.getOthers() + HashMap othersInfo = bir.getOthers(); if (othersInfo == null) { throw new BiometricSignatureValidationException("Others value is null inside BIR"); }