From 8a21307b27b53196bf582a71c06f54fa3f83afb5 Mon Sep 17 00:00:00 2001 From: Naeem Ullah Date: Tue, 27 Jan 2026 12:47:40 +0500 Subject: [PATCH] Add empty string checks for GL and account codes Updated validation in TransactionService to throw exceptions if GL or account codes are null or empty, ensuring more robust input validation for GL-to-GL and account-to-account transactions. --- .../com/mfsys/aconnect/client/service/TransactionService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aconnect/src/main/java/com/mfsys/aconnect/client/service/TransactionService.java b/aconnect/src/main/java/com/mfsys/aconnect/client/service/TransactionService.java index 2ce12f5..18f8631 100644 --- a/aconnect/src/main/java/com/mfsys/aconnect/client/service/TransactionService.java +++ b/aconnect/src/main/java/com/mfsys/aconnect/client/service/TransactionService.java @@ -108,7 +108,7 @@ public class TransactionService { String drLocation = gLtoGLRequest.getDebitGl().getPlcLocacode(); String crLocation = gLtoGLRequest.getCreditGl().getPlcLocacode(); - if(crGL == null || drGL == null) { + if (crGL == null || crGL.isEmpty() || drGL == null || drGL.isEmpty()) { throw new MissingGLCodeException(gLtoGLRequest.getPorOrgacode()); } @@ -160,7 +160,7 @@ public class TransactionService { String crAcc = accountToAccountDTO.getCreditAcc().getMbmBkmsnumber(); String drAcc = accountToAccountDTO.getDebitAcc().getMbmBkmsnumber(); - if(crAcc == null || drAcc == null) { + if (crAcc == null || crAcc.isEmpty() || drAcc == null || drAcc.isEmpty()) { throw new MissingAccountException(accountToAccountDTO.getPorOrgacode()); }