galovics commented on code in PR #2743:
URL: https://github.com/apache/fineract/pull/2743#discussion_r1021673446


##########
fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java:
##########
@@ -204,7 +204,12 @@ public JournalEntryData mapRow(final ResultSet rs, 
@SuppressWarnings("unused") f
                 }
                 Long transaction = null;
                 if (entityType != null) {
-                    transaction = 
Long.parseLong(transactionId.substring(1).trim());
+                    if (transactionId.substring(0, 2).equalsIgnoreCase("SH")) {

Review Comment:
   This is quite the opposite of a robust implementation. If you want to fix 
this, let's broaden our perspective and do a proper fix. Checking the beginning 
of strings is definitely not the way to go. Plus, you're lacking tests anyway.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to