Skip to content

DAEMON-479: Accept wrapped classes in jsvc -check - #317

Open
AryanRG wants to merge 2 commits into
apache:masterfrom
AryanRG:DAEMON-479-wrapped-check
Open

AryanRG wants to merge 2 commits into
apache:masterfrom
AryanRG:DAEMON-479-wrapped-check

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 17, 2026

Copy link
Copy Markdown

Summary

Fix DAEMON-479: jsvc -check @ClassName rejected wrapped application classes that DaemonLoader.load() accepts. Check the class behind the @ prefix and instantiate the same DaemonWrapper used by the load path. Plain class names retain their prior behavior.

Verification

  • Added two DaemonLoader.check() tests covering valid and missing plain/wrapped classes.
  • mvn -q verify and the default mvn both passed locally.
  • Native jsvc was not built or exercised end-to-end.

AI assistance used (Kiro) for code and test drafting and independent patch review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@garydgregory

Copy link
Copy Markdown
Member

@AryanRG please rebase on git master to pick up the CodeQL fix.

Assisted-By: Kiro (Claude Opus 5.5)
@AryanRG

AryanRG commented Nov 4, 2026 •

Copy link
Copy Markdown
Author

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 mvn -B -ntp passes locally. I merged rather than rebased to avoid a force-push; happy to rebase instead if you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants