Skip to content

Commit

Permalink
generate empty if null
Browse files Browse the repository at this point in the history
  • Loading branch information
pstreef committed Jul 26, 2024
1 parent dad83ec commit 3862417
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,11 @@ public Yaml visitDocuments(Yaml.Documents documents, ExecutionContext ctx) {
}

@Language("yml")
@Nullable
private String getYamlContents(ExecutionContext ctx) {
@Language("yml") String yamlContents = fileContents;
if (yamlContents == null && fileContentsUrl != null) {
yamlContents = Remote.builder(Paths.get(relativeFileName), URI.create(fileContentsUrl)).build().printAll(ctx);
}
return yamlContents;
return yamlContents == null ? "" : yamlContents;
}
}

0 comments on commit 3862417

Please sign in to comment.