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

Why is Computer.getDescription() restricted?

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • _unsorted
    • None

      In:

      https://javadoc.jenkins-ci.org/hudson/model/Computer.html#getDescription--

       

      Shows:

      @Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class) @Exported @NonNull public 

      String

       getDescription()
      Returns the Node description for this computer. Empty String if the Node is null.
       
      Why is that method Restricted?
       
      mvn install shows this error when trying to use that method:
      [INFO] — access-modifier-checker:1.27:enforce (default-enforce) @ SystemInfo —
      [ERROR] io/jenkins/plugins/sysinfo/SysInfoAction:46 hudson/model/Computer.getDescription()Ljava/lang/String; must not be used
       

            ozhang Owen Zhang
            ozhang Owen Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: