Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42524

Don't blacklist GStringImpl from XStream serialization

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      So I wanted to discuss this, in case there's a good reason for rejecting org.codehaus.groovy.runtime.GStringImpl specifically. We're currently blacklisting org.codehaus.groovy.runtime.* in hudson.remoting.ClassFilter.DEFAULT and that can cause hassles, so I thought it was worth discussion.

        Attachments

          Issue Links

            Activity

            Hide
            abayer Andrew Bayer added a comment -

            Probably just XStream, yeah.

            Show
            abayer Andrew Bayer added a comment - Probably just XStream, yeah.
            Hide
            jglick Jesse Glick added a comment -

            Any attempt to save a GString in XML (or, not shown here, pass it over Remoting) should be treated as a plugin bug.

            Show
            jglick Jesse Glick added a comment - Any attempt to save a GString in XML (or, not shown here, pass it over Remoting) should be treated as a plugin bug.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I agree. JEP-200 will punish users of this class, I'd guess

            Show
            oleg_nenashev Oleg Nenashev added a comment - I agree. JEP-200 will punish users of this class, I'd guess
            Hide
            antonyz Antony Zhong added a comment -

            I was one of customers being punished by JEP-200 too. Interestingly I have found a workaround like below. Basically, it seems to work fine when converting into String explicitly within the script.

             

            def retList = []
            for (String s in aFunctionReturnsAGStringList()) {
               retList << s
            }
            retList
            

             

            Show
            antonyz Antony Zhong added a comment - I was one of customers being punished by JEP-200 too. Interestingly I have found a workaround like below. Basically, it seems to work fine when converting into String explicitly within the script.   def retList = [] for (String s in aFunctionReturnsAGStringList()) { retList << s } retList  
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            yes, any conversion does the job

            Show
            oleg_nenashev Oleg Nenashev added a comment - yes, any conversion does the job

              People

              • Assignee:
                Unassigned
                Reporter:
                abayer Andrew Bayer
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: