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

Abuse of getDescriptor("ShortName")

XMLWordPrintable

      If you install the Parameterized Trigger plugin in an older version of Jenkins, you can get a 404 in the validation area for “Build after other projects are built”. This is because Jenkins.instance.getDescriptor('BuildTrigger') (used from the /job/downstream/descriptorByName/BuildTrigger/check?value=upstream URL) may return either a hudson.tasks.BuildTrigger.DescriptorImpl or a hudson.plugins.parameterizedtrigger.BuildTrigger.DescriptorImpl, apparently at random.

      4d33b6a should have fixed this in core 1.480. However it would be better for this method to actively check for ambiguities so similar problems do not recur.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: