Update MockPipelineScriptCPS.groovy#710
Open
AbhinavJha1023 wants to merge 1 commit intojenkinsci:masterfrom
Open
Update MockPipelineScriptCPS.groovy#710AbhinavJha1023 wants to merge 1 commit intojenkinsci:masterfrom
AbhinavJha1023 wants to merge 1 commit intojenkinsci:masterfrom
Conversation
Better Serialization: Uses transient for cachedVariables to prevent serialization issues. Thread Safety: Uses Collections.synchronizedMap() to avoid concurrency issues. Explicit Casting and Suppression: Handles type safety with @SuppressWarnings("unchecked"). Performance Optimization: Uses HashMap directly instead of relying on clone().
nre-ableton
requested changes
Jul 7, 2025
Contributor
nre-ableton
left a comment
There was a problem hiding this comment.
First, thanks for your contribution and sorry for the delay on reviewing.
Aside from several style nitpicks (namely semicolons, empty lines, etc), I don't understand the point of this PR. Why bother writing to cachedVariables if it never gets read from?
This PR would also be easier to review if each of the changes mentioned in the commit message were a separate commit. That's a minor concern, though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Better Serialization: Uses transient for cachedVariables to prevent serialization issues.
Thread Safety: Uses Collections.synchronizedMap() to avoid concurrency issues.
Explicit Casting and Suppression: Handles type safety with @SuppressWarnings("unchecked").
Performance Optimization: Uses HashMap directly instead of relying on clone().
Testing done
Submitter checklist