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

Don't blacklist GStringImpl from XStream serialization

    XMLWordPrintable

Details

    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

            abayer Andrew Bayer added a comment -

            Probably just XStream, yeah.

            abayer Andrew Bayer added a comment - Probably just XStream, yeah.
            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.

            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.
            oleg_nenashev Oleg Nenashev added a comment -

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

            oleg_nenashev Oleg Nenashev added a comment - I agree. JEP-200 will punish users of this class, I'd guess
            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
            

             

            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  
            oleg_nenashev Oleg Nenashev added a comment -

            yes, any conversion does the job

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: