Skip to content

Commit

Permalink
Return candidate if string is null, empty, or does not contain anyvar…
Browse files Browse the repository at this point in the history
…iable tokens
  • Loading branch information
badriance committed Feb 16, 2017
1 parent 84b56f7 commit 0007d23
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public EnvironmentVariableValueInjector(VariableResolver resolver, EnvVars envir
* @return a new string with all possible tokens replaced with values.
*/
public String injectEnvironmentVariableValues(String candidate) {
if (!candidate.contains("${")) { // Early exit
if (candidate == null || candidate.isEmpty() || !candidate.contains("${")) { // Early exit
return candidate;
}
String resolved = candidate;
Expand Down

0 comments on commit 0007d23

Please sign in to comment.