From eb59558965c4a076f702c79ad66c274e3204928d Mon Sep 17 00:00:00 2001 From: Neha2365 <110969715+Neha2365@users.noreply.github.com> Date: Wed, 12 Jul 2023 12:45:52 +0530 Subject: [PATCH] Update MatchService.java (#281) Signed-off-by: Neha2365 <110969715+Neha2365@users.noreply.github.com> --- .../java/io/mosip/mock/sdk/service/MatchService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mock-sdk/src/main/java/io/mosip/mock/sdk/service/MatchService.java b/mock-sdk/src/main/java/io/mosip/mock/sdk/service/MatchService.java index 53940209..7914c71c 100644 --- a/mock-sdk/src/main/java/io/mosip/mock/sdk/service/MatchService.java +++ b/mock-sdk/src/main/java/io/mosip/mock/sdk/service/MatchService.java @@ -380,6 +380,7 @@ private Decision compareFaces(List sampleSegments, List gallerySegment break; Boolean bio_found = false; + LOGGER.info("SampleBIR Value check",sampleBIR.getBdbInfo().getSubtype()); if (sampleBIR.getBdbInfo().getSubtype() != null && !sampleBIR.getBdbInfo().getSubtype().isEmpty() && sampleBIR.getBdbInfo().getSubtype().get(0) != null && !sampleBIR.getBdbInfo().getSubtype().get(0).isEmpty()) { @@ -387,17 +388,18 @@ private Decision compareFaces(List sampleSegments, List gallerySegment // need to check isValidBIRParams and isValidBDBData too // if (!isValidBirData(galleryBIR)) // break; - if (galleryBIR.getBdbInfo().getSubtype().get(0) + LOGGER.info("GalleryBIR Value check",galleryBIR.getBdbInfo().getSubtype()); + if (galleryBIR.getBdbInfo().getSubtype() == null || galleryBIR.getBdbInfo().getSubtype().isEmpty() || galleryBIR.getBdbInfo().getSubtype().get(0) .equals(sampleBIR.getBdbInfo().getSubtype().get(0))) { if (Util.compareHash(galleryBIR.getBdb(), sampleBIR.getBdb())) { LOGGER.info("Modality: {}; Subtype: {} -- matched", BiometricType.FACE.value(), - galleryBIR.getBdbInfo().getSubtype().get(0)); + galleryBIR.getBdbInfo().getSubtype()); matched.add(true); bio_found = true; break; } else { LOGGER.info("Modality: {}; Subtype: {} -- not matched", BiometricType.FACE.value(), - galleryBIR.getBdbInfo().getSubtype().get(0)); + galleryBIR.getBdbInfo().getSubtype()); matched.add(false); bio_found = true; } @@ -439,4 +441,4 @@ private Decision compareFaces(List sampleSegments, List gallerySegment } return decision; } -} \ No newline at end of file +}