FINERACT-2722: Remove orphaned CashierWritePlatformService and ModifyCashierCommandHandler - #6198
Open
AshharAhmadKhan wants to merge 1 commit into
Conversation
…CashierCommandHandler CashierWritePlatformService contained only null-stub methods and had no Spring annotation, never instantiated anywhere in the codebase. ModifyCashierCommandHandler injected CashierWritePlatformService but had no @service or @CommandType annotation, so it was never routed to by the command dispatcher. Nothing else referenced it. The live cashier-teller allocation path is AllocateCashierToTellerCommandHandler, which calls TellerWritePlatformService.allocateCashierToTeller(Long, JsonCommand) in TellerWritePlatformServiceJpaImpl, a separate class that happens to share method names with the removed one. Also removed a stale @see javadoc reference to CashierWritePlatformService in DeleteCashierAllocationCommandHandler, which is live and correctly wired to TellerWritePlatformService. Verified via full-repo grep across java/xml/yml/yaml/properties, permission table grep, reflection-lookup grep, and test-file grep, no other references found. Module compiles clean and existing teller test suite passes.
Contributor
Author
|
hey @adamsaghy , failure look flaky, can you please retrigger those checks? thanks a lot! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes two dead classes from the teller/cashier module and one stale
javadoc reference.
CashierWritePlatformService
(
fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/)is a plain concrete class with no
@Serviceor@Componentannotation. All three of its methods (
allocateCashierToTeller,deleteCashier,modifyCashier) are null stubs with noimplementation.
ModifyCashierCommandHandler
(
fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/)injects
CashierWritePlatformServicethrough a constructor field andcalls
modifyCashieron it. This handler has no@Serviceand no@CommandTypeannotation, so Fineract's command dispatcher neverroutes anything to it. Nothing else in the codebase constructs or
injects this handler.
Also removed a stale
@seejavadoc line inDeleteCashierAllocationCommandHandler.java, which is live andcorrectly wired to
TellerWritePlatformService. The line pointed atCashierWritePlatformService, which it never actually depended on.Why this is safe
The live cashier-teller allocation path is
AllocateCashierToTellerCommandHandler, which callsTellerWritePlatformService.allocateCashierToTeller(Long entityId, JsonCommand command),implemented in
TellerWritePlatformServiceJpaImpl.javaline 197.This is a separate class from
CashierWritePlatformServicethathappens to share method names.
Verification
.java,.xml,.yml,.yaml,.propertiesfor both class names. Only the two deleted files and the one stale
doc comment matched.
MODIFYCASHIER/MODIFY_CASHIER. Noresults, no dangling
m_permissionrow.Class.forName,getBean). Noresults.
--include="*Test.java"). Noresults, no test references either class.