Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Task: JENKINS-32972 - NullpointerException in KlarosTestResultPublish…
  • Loading branch information
stolp committed Feb 16, 2016
1 parent f47f959 commit ef52d94
Showing 1 changed file with 7 additions and 6 deletions.
Expand Up @@ -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;
}
Expand Down

0 comments on commit ef52d94

Please sign in to comment.