Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added null-check in MinimumInstanceChecker #431

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

Thylossus
Copy link

Since https://javadoc.jenkins-ci.org/hudson/model/Queue.Item.html#getAssignedLabel-- can return
null, it is unsafe to call 'label.matches(...)'. Removing all null elements from the stream
before the unsafe call prevents the NPE reported in https://issues.jenkins-ci.org/browse/JENKINS-61146

Since https://javadoc.jenkins-ci.org/hudson/model/Queue.Item.html#getAssignedLabel-- can return
null, it is unsafe to call 'label.matches(...)'. Removing all null elements from the stream
before the unsafe call prevents the NPE reported in https://issues.jenkins-ci.org/browse/JENKINS-61146
@thoulen thoulen merged commit 53c6878 into jenkinsci:master Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants