Re: modifying a @DataboundConstructor

2020-07-08 Thread Daniel Beck
You want something like this: - public class MySecurityRealm extends SecurityRealm { private MyConfiguration configuration; private transient String clientId; private transient Secret clientSecret; private Object readResolve() { if (clientId != null || clientSecret != n

Re: Jenkins Templating Engine - questions regarding interacting with arbitrary SCMs

2020-07-08 Thread Mark Waite
Considering the number of existing implementations of SCMFileSystem.Builder and the number of implementations of SCMSource , I think it would be

Jenkins Templating Engine - questions regarding interacting with arbitrary SCMs

2020-07-08 Thread steven...@gmail.com
Hello all! *Context:* As part of the Jenkins Templating Engine , users define a configuration file in which they can specify a set of libraries to load. These libraries, in turn, map to a directory that may or may not exist in a set of c

Re: modifying a @DataboundConstructor

2020-07-08 Thread Goyot, Martin
Sure, so the old version was: public class MySecurityRealm extends SecurityRealm { private String clientId; private Secret clientSecret; @DataBoundConstructor public MySecurityRealm(String clientId, String clientSecret) { this.clientId = Util.fixEmptyAndTrim(clientId);

Re: modifying a @DataboundConstructor

2020-07-08 Thread Matt Sicker
There's an automatic converter between String and Secret when loading XML files via XStream in Jenkins. The only compatibility concerns you should have here are for any code that directly calls that constructor or uses the string value of the secret. On Wed, Jul 8, 2020 at 3:51 AM Goyot, Martin w

Re: modifying a @DataboundConstructor

2020-07-08 Thread Ullrich Hafner
https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility It would help if you could describe the exact changes in your class (old vs. new version). > Am 08.07.2020 um 10:51 schrieb Goyot,

Re: modifying a @DataboundConstructor

2020-07-08 Thread Goyot, Martin
Thanks Ullrich! Do you have any pointer for me as to how to proceed? Le mer. 8 juil. 2020 à 10:34, Ullrich Hafner a écrit : > > > Am 08.07.2020 um 10:16 schrieb Goyot, Martin : > > Hi there, > > On the OAuth plugin I'm working on, I'd like to modify the > @DataboundConstructor for the Realm. Is

Re: modifying a @DataboundConstructor

2020-07-08 Thread Ullrich Hafner
> Am 08.07.2020 um 10:16 schrieb Goyot, Martin : > > Hi there, > > On the OAuth plugin I'm working on, I'd like to modify the > @DataboundConstructor for the Realm. Issue is, if I modify it, whether be the > signature or the inners of the function, the deserialization for previous > instance

modifying a @DataboundConstructor

2020-07-08 Thread Goyot, Martin
Hi there, On the OAuth plugin I'm working on, I'd like to modify the @DataboundConstructor for the Realm. Issue is, if I modify it, whether be the signature or the inners of the function, the deserialization for previous instances won't work anymore hence breaking any previous installation of the