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

Symbol lookup returns wrong result

    Details

    • Similar Issues:

      Description

      Symbol lookup returns an descriptor for an rather unrelated class which not annotated with the given symbol name.

      When running the following code in Script Console, the same objects is printed each time.

      import org.jenkinsci.plugins.structs.SymbolLookup
      import hudson.plugins.copyartifact.StatusBuildSelector
      import com.tikal.jenkins.plugins.multijob.MultiJobBuildSelector
        
      def d1 = Jenkins.instance.getDescriptor(StatusBuildSelector)
      println SymbolLookup.get().find(d1.class, 'lastSuccessful')
      
      def d2 = Jenkins.instance.getDescriptor(MultiJobBuildSelector)
      println SymbolLookup.get().find(d2.class, 'lastSuccessful')
      

        Attachments

          Activity

          Hide
          daspilker Daniel Spilker added a comment -

          I think the problem is that MultiJobBuildSelector reuses a descriptor class rather than defining it's own. See https://github.com/jenkinsci/tikal-multijob-plugin/blob/jenkins-multijob-plugin-1.29/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuildSelector.java#L75-L79. SimpleBuildSelectorDescriptor is the base class for several descriptors in copyartifact.

          Show
          daspilker Daniel Spilker added a comment - I think the problem is that MultiJobBuildSelector reuses a descriptor class rather than defining it's own. See https://github.com/jenkinsci/tikal-multijob-plugin/blob/jenkins-multijob-plugin-1.29/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuildSelector.java#L75-L79 . SimpleBuildSelectorDescriptor is the base class for several descriptors in copyartifact.
          Hide
          yorammi Yoram Michaeli added a comment -

          Closing issue as part of tikal-multijob-plugin issues cleanup.
          If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

          Show
          yorammi Yoram Michaeli added a comment - Closing issue as part of tikal-multijob-plugin issues cleanup. If still relevant, please open a matching issue in https://github.com/jenkinsci/tikal-multijob-plugin/issues (you can refer to this issue in its description)

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              daspilker Daniel Spilker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: