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

Remove External API Deprecated Warnings

XMLWordPrintable

      Role-based Authorization compile has nine (9) deprecated warnings arising from API external to this plugin:

      1. deprecated Jenkins.RUN_SCRIPTS field once
      2. deprecated PluginManager fields twice:
        • CONFIGURE_UPDATECENTER
        • UPLOAD_PLUGINS
      3. deprecated Jenkins.getInstance() method once
      4. deprecated Jenkins.getActiveInstance() method 5 times

      Proposed resolution:

      • @SuppressWarnings("deprecation") above field declaration resolved 1 and 2 above
      • Replace Jenkins.getInstance() with Jenkins.getInstanceOrNull() per JavaDoc.
      • Replace Jenkins.getActiveInstance() with Jenkins.get() per JavaDoc.

      Consider this a newbie contributor training exercise.

            conrad_t_pino Conrad T. Pino
            conrad_t_pino Conrad T. Pino
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: