NPE in form validation when configured on a non-AbstractProject, like a workflow job.

This commit is contained in:
Jesse Glick committed 2014-10-14 08:32:44 -04:00
1 parent 9620057a58
commit 95c73c313f
2 files changed
+6

No files matched your search

@@ -296,6 +296,9 @@ public class ArtifactArchiver extends Recorder implements SimpleBuildStep {
* Performs on-the-fly validation on the file mask wildcard.
*/
public FormValidation doCheckArtifacts(@AncestorInPath AbstractProject project, @QueryParameter String value) throws IOException {
if (project == null) {
return FormValidation.ok();
}
return FilePath.validateFileMask(project.getSomeWorkspace(),value);
}
@@ -260,6 +260,9 @@ public class Fingerprinter extends Recorder implements Serializable, DependencyD
}
public FormValidation doCheckTargets(@AncestorInPath AbstractProject<?,?> project, @QueryParameter String value) throws IOException {
if (project == null) {
return FormValidation.ok();
}
return FilePath.validateFileMask(project.getSomeWorkspace(),value);
}