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

Transient field createdBaselines is null in UcmMakeBaseline.java

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • clearcase-plugin
    • None
    • Platform: All, OS: All

    Description

      The field createdBaselines is transient and is always null. It should be
      initialized in the method
      private void makeBaseline(AbstractBuild build, HudsonClearToolLauncher
      clearToolLauncher, FilePath filePath)
      I will attach a text file with a fixed version of that method.

      Attachments

        Activity

          Ok, I understand
          Neverless, the 'createdBaselines' must follow the same behavior that the two
          instances 'readWriteComponents' and 'latestBaselines'.

          All these three vraiables are initialized by the preBuild() method

          The problem here is that the method 'makeBaseline' return void, despite of
          List<String>. So, it more suitable for the 'makeBaseline' to return
          List<String> and initializes the 'createdBaselines' instance, in the same model
          with :
          readWriteComponents filed - getReadWriteComponent() method, and
          latestBaselines field - getLatestBaselineNames method

          With this simple solution, we remove the 'createdBaselines' test to null
          and the instance createdBaselines can be left intialized to null like the other
          instances.

          The runtime result is the same but the code is more maintenable

          gbois Gregory Boissinot added a comment - Ok, I understand Neverless, the 'createdBaselines' must follow the same behavior that the two instances 'readWriteComponents' and 'latestBaselines'. All these three vraiables are initialized by the preBuild() method The problem here is that the method 'makeBaseline' return void, despite of List<String>. So, it more suitable for the 'makeBaseline' to return List<String> and initializes the 'createdBaselines' instance, in the same model with : readWriteComponents filed - getReadWriteComponent() method, and latestBaselines field - getLatestBaselineNames method With this simple solution, we remove the 'createdBaselines' test to null and the instance createdBaselines can be left intialized to null like the other instances. The runtime result is the same but the code is more maintenable

          Created an attachment (id=633)
          The createdBaseLines patch

          gbois Gregory Boissinot added a comment - Created an attachment (id=633) The createdBaseLines patch

          Code changed in hudson
          User: : sunfire
          Path:
          trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ucm/UcmMakeBaseline.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=16716
          Log:
          JENKINS-3304
          JENKINS-3186

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : sunfire Path: trunk/hudson/plugins/clearcase/src/main/java/hudson/plugins/clearcase/ucm/UcmMakeBaseline.java http://fisheye4.cenqua.com/changelog/hudson/?cs=16716 Log: JENKINS-3304 JENKINS-3186
          sunfire sunfire added a comment -

          Thanks for the patch

          sunfire sunfire added a comment - Thanks for the patch
          sunfire sunfire added a comment -

          Verified

          sunfire sunfire added a comment - Verified

          People

            sunfire sunfire
            henrikreinhold henrikreinhold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: