-
Notifications
You must be signed in to change notification settings - Fork 196
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-68071] Java 17 compat: make CpsThreadGroup.paused
transient
to avoid XStreaming AtomicBoolean
#515
[JENKINS-68071] Java 17 compat: make CpsThreadGroup.paused
transient
to avoid XStreaming AtomicBoolean
#515
Conversation
…reaming `AtomicBoolean`
/** | ||
* Persistent version of {@link #paused}. | ||
*/ | ||
private boolean executionPaused; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not hurt to make this volatile
? No strong preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe make it Boolean
and only set it to a non-null value in writeReplace
(and null it out in readResolve
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for volatile
since it is not read except during deserialization.
Considered setting it during writeReplace
but seemed like overkill since it is only ever written in two places and it just as easy to set it then.
/** | ||
* Persistent version of {@link #paused}. | ||
*/ | ||
private boolean executionPaused; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe make it Boolean
and only set it to a non-null value in writeReplace
(and null it out in readResolve
).
CpsThreadGroup.paused
transient
to avoid XStreaming AtomicBoolean
CpsThreadGroup.paused
transient
to avoid XStreaming AtomicBoolean
https://issues.jenkins.io/browse/JENKINS-68071
Amends #32. Relevant test coverage is in
CpsFlowExecutionTest
. Fixes the Java 17 run ofprinting as expected