Introduce the validated version of Jenkins:getInstance()

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Currently, the jenkins.model.Jenkins::getInstance() method is marked as @CheckForNull, but the most of Jenkins code does not actually check the return value. It leads to tons of static analysis errors, hence it is hard to analyze the code.

      I propose to...

      1. Add an additional method (e.g. Jenkins::getActiveInstance()), which throws an exception on access errors
      2. Convert all non-checked Jenkins::getInstance() methods

            Assignee:
            Oleg Nenashev
            Reporter:
            Oleg Nenashev
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: