You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Ashhar Ahmad Khan (Jira)" <ji...@apache.org> on 2026/07/30 08:11:00 UTC
[jira] [Assigned] (FINERACT-2722) Remove orphaned CashierWritePlatformService and ModifyCashierCommandHandler (dead code, no command routing, no test coverage)
[ https://issues.apache.org/jira/browse/FINERACT-2722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashhar Ahmad Khan reassigned FINERACT-2722:
-------------------------------------------
Assignee: Ashhar Ahmad Khan
> Remove orphaned CashierWritePlatformService and ModifyCashierCommandHandler (dead code, no command routing, no test coverage)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: FINERACT-2722
> URL: https://issues.apache.org/jira/browse/FINERACT-2722
> Project: Apache Fineract
> Issue Type: Task
> Reporter: Ashhar Ahmad Khan
> Assignee: Ashhar Ahmad Khan
> Priority: Minor
>
> *What is being removed*
> CashierWritePlatformService, at fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/, is a plain concrete class with no @Service or @Component annotation. It contains three methods, allocateCashierToTeller, deleteCashier, modifyCashier, all of them null stubs with no implementation.
> ModifyCashierCommandHandler.java, at fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/, injects CashierWritePlatformService through a constructor field and calls modifyCashier on it. This handler has no @Service annotation and no @CommandType annotation, so Fineract's command dispatcher never routes anything to it. Nothing else in the codebase constructs or injects this handler.
> A stale @see javadoc line in DeleteCashierAllocationCommandHandler.java, which is live and correctly wired to TellerWritePlatformService, pointed at CashierWritePlatformService. That line has been removed.
> *Why it's dead code*
> The live cashier-teller allocation path is AllocateCashierToTellerCommandHandler, which calls allocateCashierToTeller(Long entityId, JsonCommand command) on TellerWritePlatformService, implemented in TellerWritePlatformServiceJpaImpl.java line 197. This is a different class from CashierWritePlatformService. The two classes share method names, but nothing in the live code path touches CashierWritePlatformService or ModifyCashierCommandHandler.
> *Changes made*
> * Deleted CashierWritePlatformService.java
> * Deleted ModifyCashierCommandHandler.java
> * Removed the stale @see line in DeleteCashierAllocationCommandHandler.java
> *Verification*
> * Full-repo grep across .java, .xml, .yml, .yaml, .properties for both class names. Only the two deleted files and the one stale doc comment matched.
> * Permission table grep for MODIFYCASHIER / MODIFY_CASHIER. No results, no dangling m_permission row.
> * Reflection-based lookup grep (Class.forName, getBean). No results.
> * Test file grep across the repo (--include="*Test.java"). No results, no test references either class.
> * {{{}./gradlew :fineract-branch:compileJava{}}}. BUILD SUCCESSFUL.
> * {{{}./gradlew :fineract-branch:test{}}}. BUILD SUCCESSFUL, 6 tests executed in the teller module (TellerCommandFromApiJsonDeserializerTest), all passed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)