Skip to content

Maintenance: Resolve initial batch of Java compilation warnings in fineract-provider#5548

Draft
pranjal-singla-15 wants to merge 1 commit intoapache:developfrom
pranjal-singla-15:fix-compilation_warnings
Draft

Maintenance: Resolve initial batch of Java compilation warnings in fineract-provider#5548
pranjal-singla-15 wants to merge 1 commit intoapache:developfrom
pranjal-singla-15:fix-compilation_warnings

Conversation

@pranjal-singla-15
Copy link

This PR addresses the general goal of improving codebase safety and maintainability by resolving compilation warnings, as suggested in the community's beginner-friendly task list.

Resolve warnings:

  1. Warning: Deprecated setCellType in Apache POI

File: FixedDepositTransactionWorkbookPopulator.java
File Path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java
Line Number: 108
Warning Type
Deprecation Warning - [deprecation]

  1. Warning: Deprecated setCellType in Apache POI

File: RecurringDepositTransactionWorkbookPopulator.java
Deprecation Warning - [deprecation] setCellType(CellType) in Cell has been deprecated

3.Warning: Depracated setCellType in Apache POI

File:
SavingsTransactionsWorkbookPopulator.java
File Path:
fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsTransactionsWorkbookPopulator.java 

4.Warning: Deprecation Fix - ExecuteReportMailingJobsTasklet
File Name: ExecuteReportMailingJobsTasklet.java
File Path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsTasklet.java
Line Number: 101
Previous code: StringUtils.containsIgnoreCase(key, "date")
Proposed fix: key != null && key.toLowerCase().contains("date")

5.Warning: Deprecation Fix - ReportMailingJobEmailAttachmentFileFormat
File: ReportMailingJobEmailAttachmentFileFormat.java
File Path: fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java
Line no.: 53,55, 57
Proposed fix:
Replaced StringUtils with native Java String.equalsIgnoreCase().

6.Warning: [dep-ann] deprecated item is not annotated with @deprecated
File: CustomAuditingHandler.java
File path: fineract\fineract-provider\src\main\java\org\apache\fineract\infrastructure\core\auditing\CustomAuditingHandler.java
Line no.: 56
Proposed fix: Added @deprecated annotation to the deprecated constructor

@adamsaghy
Copy link
Contributor

Please make sure to follow proper PR title and commit message convetions:
FINERACT-2421: Resolve initial batch of Java compilation warnings in fineract-provider

Please kindly follow the documentation to set up GPG signature for your github user.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':fineract-provider:licenseMain'.
> License violations were found: /home/runner/work/fineract/fineract/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java}

* 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./
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':fineract-provider:checkstyleMain'.
> A failure occurred while executing org.gradle.api.plugins.quality.internal.CheckstyleAction
   > Checkstyle rule violations were found. See the report at: file:///home/runner/work/fineract/fineract/fineract-provider/build/reports/checkstyle/main.html
     Checkstyle files with violations: 1
     Checkstyle violations by severity: [error:1]

==============================================================================

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.

2 participants