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...
- Add an additional method (e.g. Jenkins::getActiveInstance()), which throws an exception on access errors
- Convert all non-checked Jenkins::getInstance() methods
[JENKINS-23339] Introduce the validated version of Jenkins:getInstance()
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 155905 ] | New: JNJira + In-Review [ 195293 ] |