fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [fineract] xurror commented on a change in pull request #1024: FINERACT-995: Rewriting logic to remove call to rs.previous()
Date Fri, 12 Jun 2020 05:37:40 GMT

xurror commented on a change in pull request #1024:

File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/
@@ -423,18 +423,14 @@ public OriginalScheduleExtractor(final String loanIdsAsString) {
             while ( {
                 Long loanId = rs.getLong("loanId");
-                List<LoanSchedulePeriodData> periodDatas = new ArrayList<>();
-                LoanSchedulePeriodData loanSchedulePeriodData = fetchLoanSchedulePeriodData(rs);
-                periodDatas.add(loanSchedulePeriodData);
-                while ( {
-                    Long tempLoanId = rs.getLong("loanId");
-                    if (loanId.equals(tempLoanId)) {

Review comment:
       Totally makes sense now. Thanks for helping me understand this better.
   I actually read a comment that suggested doing this or using caching or hashmap or any
other collection to hold all the resultset and instead iterate through it as you did but it
just wasn't clear to me.
   Unfortunately we don't have a way testing this but I agree with your approach. Since it
passes all IT tests, we can just blindly merge this 2 or 3 days if there are no objections
and hope for the best 😁.

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.

For queries about this service, please contact Infrastructure at:

View raw message