Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-68885] Fix class cast exception when VarMaskRegexEntry data is not bound #60

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

arthas-choi
Copy link
Contributor

@arthas-choi arthas-choi commented Oct 4, 2023

JENKINS-68885 Fix class cast exception when VarMaskRegexEntry data is not bound

If you try to create a Maskpassword Pipiline using regex, a class cast exception will occur.

DataBoundConstructor uses String and String as parameters, but in Descriptor, it is sent by casting to VarMaskRegex.

If I change the descriptor to properly use VarMaskRegexEntry, it works fine.

Testing done

Pipeline Script
image

Console Log Output
image

Submitter checklist

Preview Give feedback

@arthas-choi arthas-choi changed the title Fix Class cast exception occurs because VarMaskRegexEntry data is not… Fix Class cast exception occurs because VarMaskRegexEntry data is not bound. Oct 4, 2023
@MarkEWaite MarkEWaite changed the title Fix Class cast exception occurs because VarMaskRegexEntry data is not bound. [JENKINS-68885] Fix class cast exception when VarMaskRegexEntry data is not bound Oct 6, 2023
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks!

@MarkEWaite
Copy link
Contributor

I tested interactively to confirm that I could see the problem before this fix and that I could not see the problem after the fix.

@MarkEWaite MarkEWaite added the bug label Oct 6, 2023
@MarkEWaite MarkEWaite merged commit 6a077a2 into jenkinsci:master Oct 6, 2023
13 checks passed
@arthas-choi
Copy link
Contributor Author

@MarkEWaite thanks

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.

2 participants