Skip to content
Permalink
Browse files
Task: JENKINS-32972 - NullpointerException in KlarosTestResultPublish…
  • Loading branch information
stolp committed Feb 16, 2016
1 parent f47f959 commit ef52d9472ce35ec86e7e336e43d43e3998279805
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/main/java/hudson/plugins/klaros/KlarosTestResultPublisher.java
@@ -748,12 +748,13 @@ private String expandVariables(final String value, final AbstractBuild<?, ?> bui
throws IOException, InterruptedException {

String result = value;
for (Entry<String, String> entry : build.getEnvironment(listener).entrySet()) {
result = result.replaceAll("\\$\\{" + entry.getKey() + "\\}", entry.getValue());
}

for (Entry<String, String> entry : build.getBuildVariables().entrySet()) {
result = result.replaceAll("\\$\\{" + entry.getKey() + "\\}", entry.getValue());
if (result != null) {
for (Entry<String, String> entry : build.getEnvironment(listener).entrySet()) {
result = result.replaceAll("\\$\\{" + entry.getKey() + "\\}", entry.getValue());
}
for (Entry<String, String> entry : build.getBuildVariables().entrySet()) {
result = result.replaceAll("\\$\\{" + entry.getKey() + "\\}", entry.getValue());
}
}
return result;
}

0 comments on commit ef52d94

Please sign in to comment.