From 0daef026349369238cba58efa05b31eec9cf92c8 Mon Sep 17 00:00:00 2001 From: Martin Bickel Date: Mon, 1 Oct 2018 18:13:48 +0200 Subject: [PATCH] Skip default parameters that are null, to avoid NPE later. --- src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java b/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java index 5ba3e756f..8abcdda05 100644 --- a/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java +++ b/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java @@ -483,7 +483,9 @@ private ArrayList getDefaultParameters() { ParametersDefinitionProperty pdp = this.job.getProperty(ParametersDefinitionProperty.class); if (pdp != null) { for (ParameterDefinition pd : pdp.getParameterDefinitions()) { - values.add(pd.getDefaultParameterValue()); + if (pd.getDefaultParameterValue() != null) { + values.add(pd.getDefaultParameterValue()); + } } } return values;