Repository navigation
DAEMON-479: Accept wrapped classes in jsvc -check - #317
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the wrapped-class validation change.
No open issues 🎉
What changed in this PR
Fixes DAEMON-479 by allowing jsvc -check @ClassName to validate wrapped applications using DaemonWrapper, consistent with the load path, while preserving plain-class behavior.
Changes:
- Validates the class behind the
@prefix and checks its wrapper. - Adds tests for existing and missing plain and wrapped classes.
- Records the fix in the release notes.
| File | Description |
|---|---|
src/test/java/org/apache/commons/daemon/support/DaemonLoaderTest.java |
Adds plain and wrapped class validation tests. |
src/main/java/org/apache/commons/daemon/support/DaemonLoader.java |
Handles wrapped class names in check(). |
src/changes/changes.xml |
Documents the DAEMON-479 fix. |
Review effort: Balanced
|
@AryanRG please rebase on git master to pick up the CodeQL fix. |
Assisted-By: Kiro (Claude Opus 5.5)
|
Thanks @garydgregory. I merged current master (26ac86f) into the branch, so it now includes the CodeQL fix from #319. The PR diff is unchanged apart from the changes.xml entry, and |
|
Merged current master and resolved the changelog conflict, keeping the existing fix and tests unchanged. The default Maven build passes all four tests. |
Follow up to PR #317. Clarify and test DaemonLoader.check() behavior. Document plain and wrapped class handling and the limits of validation. Add regression tests for wrapped applications with private or throwing constructors and verify that an empty class name returns false. Assisted-By: OpenAI Codex
Summary
Fix DAEMON-479:
jsvc -check @ClassNamerejected wrapped application classes thatDaemonLoader.load()accepts. Check the class behind the@prefix and instantiate the sameDaemonWrapperused by the load path. Plain class names retain their prior behavior.Verification
DaemonLoader.check()tests covering valid and missing plain/wrapped classes.mvn -q verifyand the defaultmvnboth passed locally.jsvcwas not built or exercised end-to-end.AI assistance used (Kiro) for code and test drafting and independent patch review.