Merge pull request #759 from Zimgir/454

Fix exception when saving job config in certain cases.
This commit is contained in:
Owen Mehegan 2018-05-26 12:56:49 -04:00 committed by GitHub
commit bf5811804f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ public final class BranchFilterFactory {
private BranchFilterFactory() { }
public static BranchFilter newBranchFilter(BranchFilterConfig config) {
if(config == null)
return new AllBranchesFilter();
switch (config.getType()) {
case NameBasedFilter:
return new NameBasedFilter(config.getIncludeBranchesSpec(), config.getExcludeBranchesSpec());