Pankraz76 commented on code in PR #20219:
URL: https://github.com/apache/kafka/pull/20219#discussion_r2232838846
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java:
##########
@@ -2998,15 +2993,6 @@ private void
verifyVersionedTaskConverterFromWorker(String converterClassConfig,
verify(plugins).newConverter(any(WorkerConfig.class),
eq(converterClassConfig), eq(converterVersionConfig));
}
- private void mockTaskHeaderConverter(ClassLoaderUsage classLoaderUsage,
HeaderConverter returning) {
Review Comment:
## On Code Maintenance and Future-Proofing
Statements about potential future needs often overlook (software's)
fundamental nature - that change is inevitable. The most maintainable systems
recognize this reality through consistent pruning rather than speculative
preservation.
-
https://pmd.github.io/pmd/pmd_rules_java_bestpractices.html#unusedprivatemethod
- [S1144: Unused "private" methods should be
removed](https://sonarsource.github.io/rspec/#/rspec/S1144)
Core Principles:
- **Active Usage Determines Value**: Code earns its place through current
utility
- **The Preservation Paradox**: Keeping "just-in-case" code creates
compounding costs
- **Carry Costs**: Unused code imposes maintenance overhead without
delivering value
Static analysis provides objective measures to:
- **Surface Architectural Decay**: Identify unused or redundant elements
- **Quantify Technical Debt**: Measure the cost of preservation
- **Enable Data-Driven Decisions**: Replace speculation with metrics
The most sustainable approach recognizes:
1. All code requires ongoing validation of its purpose
2. Unused components represent decisions already made (through disuse)
3. Prevention scales better than retrospective cleanup
This perspective transforms maintenance from debate to process - where tools
surface facts and systems evolve through measured iteration rather than
speculative anticipation.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]