Skip to content

FINERACT-2437: Decrease compilation warnings#5721

Merged
adamsaghy merged 1 commit intoapache:developfrom
symbaglobal:FINERACT-2437-decrease-compilation-warnings
Apr 6, 2026
Merged

FINERACT-2437: Decrease compilation warnings#5721
adamsaghy merged 1 commit intoapache:developfrom
symbaglobal:FINERACT-2437-decrease-compilation-warnings

Conversation

@rhopman
Copy link
Copy Markdown
Contributor

@rhopman rhopman commented Mar 30, 2026

Replace deprecated method calls with their modern equivalents across several modules:

  • ObjectUtils.defaultIfNull (deprecated in Commons Lang 3.15) → Objects.requireNonNullElse in 8 files across fineract-charge, fineract-core, fineract-loan, fineract-provider, and fineract-progressive-loan
  • RandomStringUtils.randomAlphabetic (static call on instance) → nextAlphabetic in DefaultContentPathRandomizer
  • StopWatch.getStartTime (deprecated in Commons Lang 3.12) → getStartInstant().toEpochMilli() in PlatformRequestLog
  • @Schema(required = true) (deprecated in Swagger 2.2) → @Schema(requiredMode = Schema.RequiredMode.REQUIRED) in AuthenticationApiResourceSwagger
  • PaymentTypeRepositoryWrapper (marked @Deprecated(forRemoval = true)) → replaced with direct PaymentTypeRepository usage in PaymentDetailAssembler, PaymentDetailWritePlatformServiceJpaRepositoryImpl, and PaymentDetailConfiguration

No behavioural changes.

Checklist

  • Write the commit message as per our guidelines
  • 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 our 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
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.

Copy link
Copy Markdown
Contributor

@Aman-Mittal Aman-Mittal left a comment

Choose a reason for hiding this comment

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

Seems ok, While i also support Krishna's suggestion too.

@adamsaghy i think it is ready for review

@rhopman rhopman force-pushed the FINERACT-2437-decrease-compilation-warnings branch from 99d190b to 7d19ff3 Compare April 1, 2026 07:09
@Aman-Mittal
Copy link
Copy Markdown
Contributor

@rhopman please chek failing case

Failed scenarios:
file:///home/runner/work/fineract/fineract/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome-Part2.feature:53 # Verify Capitalized income and Caplitalized income adjustment - Accounting and repayment schedule handling in case of loan is overpaid (Capitalized Income Scenarios - UC9)

32 Scenarios (1 failed, 31 passed)
723 Steps (1 failed, 1 skipped, 721 passed)
4m16.100s

org.opentest4j.AssertionFailedError:
expected: 600L
but was: 700L
at org.apache.fineract.test.messaging.event.EventCheckHelper.lambda$loanAccountDataV1Check$6(EventCheckHelper.java:208)
at org.apache.fineract.test.messaging.EventAssertion$EventAssertionBuilder.extractingData(EventAssertion.java:145)
at org.apache.fineract.test.messaging.event.EventCheckHelper.loanAccountDataV1Check(EventCheckHelper.java:173)
at org.apache.fineract.test.messaging.event.EventCheckHelper.loanBalanceChangedEventCheck(EventCheckHelper.java:160)
at org.apache.fineract.test.stepdef.loan.LoanStepDef.createCBR(LoanStepDef.java:629)
at ✽.Admin makes Credit Balance Refund transaction on "15 April 2024" with 15 EUR transaction amount(file:///home/runner/work/fineract/fineract/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome-Part2.feature:720)

Task :fineract-e2e-tests-runner:cucumber FAILED
Task :fineract-e2e-tests-runner:allureReport NO-SOURCE
gradle/actions: Writing build results to /home/runner/work/_temp/.gradle-actions/build-results/tests-1775050773226.json

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

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':fineract-e2e-tests-runner:cucumber'.

java.lang.RuntimeException: The execution failed

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org.

BUILD FAILED in 4m 54s
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.
114 actionable tasks: 4 executed, 110 up-to-date
Test failed for src/test/resources/features/LoanCapitalizedIncome-Part2.feature

@rhopman rhopman force-pushed the FINERACT-2437-decrease-compilation-warnings branch from 41194cc to a1cd330 Compare April 2, 2026 09:08
Copy link
Copy Markdown
Contributor

@DeathGun44 DeathGun44 left a comment

Choose a reason for hiding this comment

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

LGTM

@Aman-Mittal Aman-Mittal requested a review from adamsaghy April 5, 2026 13:11
@adamsaghy adamsaghy merged commit 7216df1 into apache:develop Apr 6, 2026
47 of 48 checks passed
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