Skip to content
Permalink
Browse files

[JENKINS-27363] - Properly handle null sentitive variables to satisfy…

… the static analysis

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
  • Loading branch information
oleg-nenashev committed Mar 11, 2015
1 parent c415857 commit 9455ca66165c30121059833b50b5581aca30a948
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/org/jenkinsci/plugins/envinject/EnvInjectPluginAction.java
@@ -22,7 +22,8 @@ public Object getTarget() {
return new EnvInjectVarList(Maps.transformEntries(envMap,
new Maps.EntryTransformer<String, String, String>() {
public String transformEntry(String key, String value) {
return getSensibleVariables() != null && getSensibleVariables().contains(key) ? "********" : value;
final Set<String> sensibleVars = getSensibleVariables();
return sensibleVars != null && sensibleVars.contains(key) ? "********" : value;
}
}));
}

0 comments on commit 9455ca6

Please sign in to comment.
You can’t perform that action at this time.