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

restore class compatibility for AbstractTaskListener

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      https://github.com/jenkinsci/jenkins/pull/3122 changed the AbstractTaskListener in a non serialization friendly way.

      For Jenkins this is not normally a problem as the same versions of classes will be used on both ends of a remoting endpoint, but custom derivatives may not have this luxury, or may use a different form of serialization other than XStream.

      The simple fix that appears to work is to restore the serialVersionUID to the pre change version.

          [JENKINS-50124] restore class compatibility for AbstractTaskListener

          James Nord created issue -
          James Nord made changes -
          Remote Link New: This issue links to "PR (Web Link)" [ 20253 ]
          James Nord made changes -
          Labels New: lts-candidate
          Baptiste Mathus made changes -
          Summary Original: restore class compatability for AbstractTaskListner New: restore class compatibility for AbstractTaskListner
          Baptiste Mathus made changes -
          Summary Original: restore class compatibility for AbstractTaskListner New: restore class compatibility for AbstractTaskListener

          Code changed in jenkins
          User: James Nord
          Path:
          core/src/main/java/hudson/util/AbstractTaskListener.java
          http://jenkins-ci.org/commit/jenkins/dcf22ca809671f19cfc2d1d10537b7bb5cf56e8d
          Log:
          JENKINS-50124 restore AbstractTaskListeners serialVersionUID.

          If a subclass was serialized (default java serialization) then the
          changes do push down the method to the interface would break
          deserialisation when in reality the classes are still compatable.

          Restoring the compatability by hard coding the serialVersionUID to what
          it was before the change.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: core/src/main/java/hudson/util/AbstractTaskListener.java http://jenkins-ci.org/commit/jenkins/dcf22ca809671f19cfc2d1d10537b7bb5cf56e8d Log: JENKINS-50124 restore AbstractTaskListeners serialVersionUID. If a subclass was serialized (default java serialization) then the changes do push down the method to the interface would break deserialisation when in reality the classes are still compatable. Restoring the compatability by hard coding the serialVersionUID to what it was before the change.

          Code changed in jenkins
          User: James Nord
          Path:
          core/src/main/java/hudson/util/AbstractTaskListener.java
          http://jenkins-ci.org/commit/jenkins/18e535fa5052f39498a93a508362ea5730efee6d
          Log:
          Merge pull request #3346 from jtnord/JENKINS-50124

          JENKINS-50124 restore AbstractTaskListeners serialVersionUID.

          Compare: https://github.com/jenkinsci/jenkins/compare/dcad69dda844...18e535fa5052

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Nord Path: core/src/main/java/hudson/util/AbstractTaskListener.java http://jenkins-ci.org/commit/jenkins/18e535fa5052f39498a93a508362ea5730efee6d Log: Merge pull request #3346 from jtnord/ JENKINS-50124 JENKINS-50124 restore AbstractTaskListeners serialVersionUID. Compare: https://github.com/jenkinsci/jenkins/compare/dcad69dda844...18e535fa5052

          James Nord added a comment -

          released towards Jenkins 2.112

          James Nord added a comment - released towards Jenkins 2.112
          James Nord made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          James Nord added a comment -

          recena is there a need to backport this to 2.107.2? if not can you remove the "lts-candidate" label

          James Nord added a comment - recena is there a need to backport this to 2.107.2? if not can you remove the "lts-candidate" label

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: