You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/11/14 15:20:27 UTC

[GitHub] [fineract] galovics commented on a diff in pull request #2743: FINERACT-1805 - Treat share transactions separately

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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org