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

Broken method compareTo method of Run

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    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

          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_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

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

            Dates

              Created:
              Updated:
              Resolved: