• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      Current implementation relies on fact that users always compare run objects with same parent. But this is not always the case.

      As result TreeSet can not be safely used with Run objects from different parents.

          [JENKINS-42319] Broken method compareTo method of Run

          Code changed in jenkins
          User: Akbashev Alexander
          Path:
          core/src/main/java/hudson/model/Run.java
          core/src/test/java/hudson/model/RunTest.java
          http://jenkins-ci.org/commit/jenkins/e8efc96f3d4ce3ed6dc121661423ad4a2892e2b2
          Log:
          JENKINS-42319 - Fix broken compareTo method of Run (#2762)

          Previous implementation relied on fact that users always compare run
          objects with same parent. But this is not always the case.
          So, it was not safe to put runs from different parents to TreeSet, i.e.

          • Make comparasion more performance friendly

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Akbashev Alexander Path: core/src/main/java/hudson/model/Run.java core/src/test/java/hudson/model/RunTest.java http://jenkins-ci.org/commit/jenkins/e8efc96f3d4ce3ed6dc121661423ad4a2892e2b2 Log: JENKINS-42319 - Fix broken compareTo method of Run (#2762) JENKINS-42319 : Fix broken compareTo method of Run Previous implementation relied on fact that users always compare run objects with same parent. But this is not always the case. So, it was not safe to put runs from different parents to TreeSet, i.e. Make comparasion more performance friendly

            jimilian Alexander A
            jimilian Alexander A
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: