Skip to content

Conversation

@budaidev
Copy link
Contributor

Description

Describe the changes made and why they were made.

Ignore if these details are present on the associated Apache Fineract JIRA ticket.

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch 2 times, most recently from c7d8a3b to ed3c0ea Compare December 17, 2025 06:47
@budaidev budaidev marked this pull request as ready for review December 17, 2025 06:48
@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch 2 times, most recently from 8503394 to b677187 Compare December 17, 2025 11:10
@adamsaghy
Copy link
Contributor

> Task :fineract-progressive-loan-embeddable-schedule-generator:test

org.apache.fineract.portfolio.loanaccount.loanschedule.domain.EmbeddableProgressiveLoanScheduleGeneratorTest

  Test testGenerate() PASSED

SUCCESS: Executed 1 tests in 2.6s

gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/__run_2-1765970062079.json

[Incubating] Problems report is available at: file:///home/runner/work/fineract/fineract/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 29s
49 actionable tasks: 1 executed, 48 up-to-date
Error: Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at org.apache.fineract.portfolio.loanaccount.loanschedule.domain.ProgressiveLoanScheduleGenerator.<clinit>(ProgressiveLoanScheduleGenerator.java:62)
	at org.apache.fineract.portfolio.loanaccount.loanschedule.domain.EmbeddableProgressiveLoanScheduleGenerator.<init>(EmbeddableProgressiveLoanScheduleGenerator.java:41)
	at Main.main(Main.java:43)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 3 more
Error: Process completed with exit code 1.

@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch 5 times, most recently from 4327678 to a05daaa Compare December 19, 2025 05:42
@budaidev budaidev marked this pull request as draft December 19, 2025 06:07
@budaidev budaidev marked this pull request as ready for review December 19, 2025 08:49
@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch from a05daaa to 65e7bac Compare December 19, 2025 11:26
@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch from 65e7bac to 5a2503b Compare December 19, 2025 12:05
@adamsaghy
Copy link
Contributor

    (see https://errorprone.info/bugpattern/NonApiType)
/home/runner/work/fineract/fineract/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:1672: error: [UnusedMethod] Method 'calculateFnResultFromDate' is never used.
    private BigDecimal calculateFnResultFromDate(final List<RepaymentPeriod> periods, final LocalDate fromDate, final MathContext mc) {
                       ^
    (see https://errorprone.info/bugpattern/UnusedMethod)
  Did you mean to remove this line?

@budaidev budaidev force-pushed the FINERACT-2412/schedule-handling-and-calculation branch from 5a2503b to b4ad7ae Compare December 19, 2025 14:12
public BigDecimal getRateFactorPlus1FromDate(LocalDate fromDate) {
return interestPeriods.stream().filter(ip -> !ip.getFromDate().isBefore(fromDate)).map(InterestPeriod::getRateFactor)
.reduce(BigDecimal.ONE, BigDecimal::add);
}
Copy link
Contributor

@Aman-Mittal Aman-Mittal Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getRateFactorPlus1FromDate
has implementation .reduce(BigDecimal.ONE, BigDecimal::add);

1 + rate1 + rate2 + rate3 ...

But the Javadoc says:

sum of (Rate Factor + 1) from interest periods
similar to.
(rate1 + 1) + (rate2 + 1) + ...

Needs some more clarification in this javadoc, it is ambiguous

* the date from which to include interest periods
* @return rate factor plus 1 for filtered interest periods
*/
public BigDecimal getRateFactorPlus1FromDate(LocalDate fromDate) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that interestPeriods never be null?

@adamsaghy adamsaghy self-requested a review December 23, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants