You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "SamaSVM (via GitHub)" <gi...@apache.org> on 2026/09/03 12:35:06 UTC
[PR] FINERACT-2801: Remove unused (dead) code in fineract-document [fineract]
SamaSVM opened a new pull request, #6379:
URL: https://github.com/apache/fineract/pull/6379
## Description
Removes unused code from `fineract-document` only.
Removed code with no references found anywhere in the codebase, including dedicated unit tests:
* **Unused classes and tests:** `FileContentDetector` and `FileContentDetectorTest`
* **Unused exception:** `ContentPathSanitizerException`
* **Unused content processors and tests:** `GzipDecoderContentProcessor`, `GzipEncoderContentProcessor`, `SizeContentProcessor`, and `ContentProcessorTest`
No functional changes were introduced; application behavior remains unaffected.
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [ ] Write the commit message as per [our guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#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](https://fineract.apache.org/docs/current/#_testing) for verifying the changes made.
- [ ] Follow our [coding conventions](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
- [ ] [This PR must not be a "code dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit). Large changes can be made in a branch, with assistance. Ask for help on the [developer mailing list](https://fineract.apache.org/#contribute).
- [ ] If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately.
Your assigned reviewer(s) will follow our [guidelines for code reviews](https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide).
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2801: Remove unused (dead) code in fineract-document [fineract]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6379:
URL: https://github.com/apache/fineract/pull/6379#issuecomment-5975291527
This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2801: Remove unused (dead) code in fineract-document [fineract]
Posted by "SamaSVM (via GitHub)" <gi...@apache.org>.
SamaSVM commented on PR #6379:
URL: https://github.com/apache/fineract/pull/6379#issuecomment-6288559708
@galovics Thank you for reviewing this PR. Regarding all four points:
**1. `ContentProcessorTest` — restored**
Kept the diff to a minimum: only the `SizeContentProcessor` / `SIZE_RESULT_VALUE` usage was removed (since that class is deleted in this PR), along with the size-related parts of the corresponding `log.info(...)` calls.
`process()` and `base64()` are otherwise left unchanged, even though they now exercise the identical `base64DecoderContentProcessor.process(DATA_BASE64)` path without `sizeContentProcessor`. I haven't changed the test structure beyond what was required to remove the deleted class.
**2. `ContentDetectorContext`, manager indirection, `ContentPipe`, and `getDefaultBufferSize()` — verified**
- **`ContentPipe` and `FineractProperties.getContent().getDefaultBufferSize()`** are still used by all four remaining processors (`Base64Encoder`, `Base64Decoder`, `DataUrlEncoder`, and `DataUrlDecoder`). They are also used outside this module by `BulkImportWorkbookServiceImpl` and `BulkImportEventListener` in `fineract-provider`. The `default-buffer-size` property is wired in `application.properties`. The Gzip processors were not their last consumers.
- **`ContentDetectorContext`** is part of the `ContentDetector` API itself, serving as its parameter/result type. It is used by `MimeContentPolicy`, `FileContentStoreService`, `DocumentApiResource`, `ImageReadPlatformServiceImpl`, and `ImageWritePlatformServiceImpl`.
- **`DefaultContentDetectorManager`** is indeed a thin pass-through to the single remaining `TikaContentDetector` implementation, injected by its concrete type rather than as a `List<ContentDetector>`. Simplifying this indirection is a legitimate design improvement, but it would constitute an API change rather than dead-code removal. I've therefore kept it out of this PR's scope and will address it in a follow-up.
**3. Bean names and parameter-key lookups — verified**
There are no `getBean(...)` calls for any `ContentProcessor` or `ContentDetector` anywhere in the repository; all dependencies are injected by type.
I also searched for the removed parameter keys and class names (`gzip` / `Gzip` / `GZIP`, `SizeContentProcessor`, `FileContentDetector`, `size.result`, and `ContentPathSanitizerException`). The only remaining Gzip-related references in the repository are an unrelated tar-compression flag in a CI workflow and `Compression.GZIP` in `fineract-war/build.gradle`.
The parameter keys (e.g., `gzip.encode.buffer-size`) were never Spring properties. They were used exclusively as keys in `ContentProcessorContext`'s in-memory parameter map, so no downstream configuration could reference them as application properties.
--
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: issues-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org