Skip to content

Fix collection-to-set conversion causing type mismatch in JCasC setters#2829

Merged
timja merged 2 commits intojenkinsci:masterfrom
somiljain2006:IllegalArgumentException-bug
Apr 13, 2026
Merged

Fix collection-to-set conversion causing type mismatch in JCasC setters#2829
timja merged 2 commits intojenkinsci:masterfrom
somiljain2006:IllegalArgumentException-bug

Conversation

@somiljain2006
Copy link
Copy Markdown
Contributor

@somiljain2006 somiljain2006 commented Apr 13, 2026

Fixes #2828

Fixes IllegalArgumentException when configuring collection-based attributes like disabledAdministrativeMonitors. Previously, it passed a List to setters expecting Set/SortedSet, causing a runtime type mismatch. This change converts collections to the appropriate type (LinkedHashSet or TreeSet) before invoking the setter.

Verified manually using mvn hpi:run with a configuration including disabledAdministrativeMonitors. Jenkins starts successfully, and the configuration is correctly applied and exported.

Your checklist for this pull request

🚨 Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test case? That demonstrates a feature that works or fixes the issue.

@somiljain2006 somiljain2006 requested a review from a team as a code owner April 13, 2026 12:40
@timja timja added the bug label Apr 13, 2026
@timja timja enabled auto-merge (squash) April 13, 2026 13:54
@timja timja merged commit 9049f43 into jenkinsci:master Apr 13, 2026
17 checks passed
@somiljain2006 somiljain2006 deleted the IllegalArgumentException-bug branch April 13, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disabledAdministrativeMonitors broken in v2071

2 participants