Given GitScm exends GitSCMBackwardCompatibility and GitSCMBackwardCompatibility implements Serializable, I though it was expecting it to be serializable.
Therefore, I suppose I can't do better than https://github.com/jenkinsci/git-push-plugin/blob/5c9525da6da7bed8fd70e8a45d62eafd1daad3f1/src/main/java/io/jenkins/plugins/git_push/GitPushStep.java#L71-L71 ? On Tuesday, July 18, 2023 at 2:25:49 PM UTC+2 Mark Waite wrote: > On Sunday, July 16, 2023 at 4:43:18 AM UTC-6 Reda wrote: > > Hi everyone, > > I'd like to understand how am I supposed to handle *GitSCM* in a > *StepExecution*. > > Here is the interesting portion of the code : > https://github.com/jenkinsci/git-push-plugin/blob/5c9525da6da7bed8fd70e8a45d62eafd1daad3f1/src/main/java/io/jenkins/plugins/git_push/GitPushStep.java#L71-L71 > > If I remove the *transient* modifier from the *GitScm *attribute, I will > get *java.io.NotSerializableException: hudson.util.DescribableList*. > > Is GitPushStep already doing that correctly? If yes, what are the > consequences of this lack of serialization? > > > GitSCM is not serializable. It is correct to not attempt to serialize > it. Can you explain why you believe that you need to serialize it? > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/24c4b9e8-a464-4097-91a4-057bccccdf7bn%40googlegroups.com.