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

Broken method compareTo method of Run

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          scm_issue_link 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)

          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
          Show
          scm_issue_link 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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: