-
Bug
-
Resolution: Fixed
-
Minor
-
None
If the workspace is null, the *Publisher classes will end up throwing a NullPointerException, causing the build to fail unexpectedly. According to AbstractBuild.getWorkspace(), the workspace can be null when it's on a slave that is no longer connected.
Line 49 of RailsStatsPublisher.java:
return fail(build, listener, "This is not a rails app directory: " + workspace.getName());
can be changed to
return fail(build, listener, "This is not a rails app directory: " + (workspace == null ? "null" : workspace.getName());
I marked this minor because the build will fail anyway, it's just more descriptive without the uncaught Exception.