Deprecate CheckMethod#toCheckUrl#26638
Conversation
There was a problem hiding this comment.
Pull request overview
Deprecates FormValidation.CheckMethod#toCheckUrl, which produces a JavaScript expression that is incompatible with CSP-enabled setups, nudging consumers toward CSP-safe alternatives.
Changes:
- Add
@deprecatedJavadoc pointing totoStemUrl()andgetDependsOn()as the replacement approach. - Annotate
toCheckUrl()with@Deprecated.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * | ||
| * @deprecated Use {@link #toStemUrl()} and {@link #getDependsOn()} instead. | ||
| */ | ||
| @Deprecated |
There was a problem hiding this comment.
New deprecation is missing a since (and optionally forRemoval) value on the annotation/Javadoc. Jenkins core commonly uses @Deprecated(since = "<version>") (or forRemoval = true when appropriate), which makes it easier for API consumers and tooling to track when the deprecation started; consider updating this to match that pattern and include the version (or placeholder per release process).
| @Deprecated | |
| @Deprecated(since = "TODO") |
MarkEWaite
left a comment
There was a problem hiding this comment.
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process.
/label ready-for-merge
This method generates a JS expression, which doesn't work with CSP enabled, so deprecate it.
Testing done
None
Screenshots (UI changes only)
Before
After
Proposed changelog entries
Proposed changelog category
/label developer
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered.