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

[JENKINS-29470] - Prevent NPE in AbstractProject.checkout when agent disconnects during the build #3094

merged 4 commits into from Mar 4, 2018
@@ -1207,7 +1207,13 @@ public boolean checkout(AbstractBuild build, Launcher launcher, BuildListener li
return true; // no SCM

FilePath workspace = build.getWorkspace();
return true;

This comment has been minimized.

Copy link

oleg-nenashev Oct 17, 2017


Sounds like an error suppression. Could you please explain this change a bit?

This comment has been minimized.

Copy link

piushkumar Oct 17, 2017

Author Contributor

Don't think the error will be suppressed. Should be caught in AbstracBuild during onCheckout. Here just avoiding a NPE for null workspace. Or if dont want to suppress it, we can throw a runtime excpetion with proper message if you suggest.


boolean r = scm.checkout(build, launcher, workspace, listener, changelogFile);
if (r) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.