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

Expand variables before using conditional

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • hockeyapp-plugin
    • None

      A few parts in the code check for a variable being null, then execute some code.
      However, when using Parameters, the value itself won't be null, but if that parameter then expands to an empty string it would be equivalent of null.
      For example: In
      https://github.com/jenkinsci/hockeyapp-plugin/blob/master/src/main/java/hockeyapp/HockeyappRecorder.java#L216

      Checking dsymPath for null would return "$SYMBOLEFILES" as not null; however, if a build is parameterized and that value is empty, it would be equivalent of null when expanded on line 217/218

      Therefore, should be expanded before checking.

            brantone Brantone
            brantone Brantone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: