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

Add a convenience static method for getting @Symbol values off an object

    XMLWordPrintable

Details

    Description

      It'd be convenient to have something on SymbolLookup that would take an object, get its class, get the @Symbol annotation on that class if it exists, and either return the value (if it exists and isn't null) or null. I've found myself writing this code in a few places already, so centralizing it seems wise.

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            plugin/src/main/java/org/jenkinsci/plugins/structs/SymbolLookup.java
            plugin/src/test/java/org/jenkinsci/plugins/structs/SymbolLookupTest.java
            http://jenkins-ci.org/commit/structs-plugin/bc43d9ad717be5beaf70e2678be58d0a63ebcb34
            Log:
            [FIXED JENKINS-37403] Add static methods for fetching Symbol values.

            Both from Objects and from Classes.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: plugin/src/main/java/org/jenkinsci/plugins/structs/SymbolLookup.java plugin/src/test/java/org/jenkinsci/plugins/structs/SymbolLookupTest.java http://jenkins-ci.org/commit/structs-plugin/bc43d9ad717be5beaf70e2678be58d0a63ebcb34 Log: [FIXED JENKINS-37403] Add static methods for fetching Symbol values. Both from Objects and from Classes.

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/cps/DSL.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java
            src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/StateMetaStep.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/b5eddacf15482efd320dd7aaa7d93760210f86c4
            Log:
            JENKINS-37403 - downstream change to use SymbolLookup.getSymbolValue(...)

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/cps/DSL.java src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/StateMetaStep.java http://jenkins-ci.org/commit/workflow-cps-plugin/b5eddacf15482efd320dd7aaa7d93760210f86c4 Log: JENKINS-37403 - downstream change to use SymbolLookup.getSymbolValue(...)

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/cps/DSL.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java
            src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/StateMetaStep.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/db985aa51f8787f080f2814996ba4c861a5e8ed0
            Log:
            Merge pull request #43 from abayer/jenkins-37403

            JENKINS-37403 - downstream change to use SymbolLookup.getSymbolValue(…)

            Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/f06a64ffdce5...db985aa51f87

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/cps/DSL.java src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/StateMetaStep.java http://jenkins-ci.org/commit/workflow-cps-plugin/db985aa51f8787f080f2814996ba4c861a5e8ed0 Log: Merge pull request #43 from abayer/jenkins-37403 JENKINS-37403 - downstream change to use SymbolLookup.getSymbolValue(…) Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/f06a64ffdce5...db985aa51f87

            People

              abayer Andrew Bayer
              abayer Andrew Bayer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: