Skip to content

Commit df9b00d

Browse files
[fix] handle empty configuration
1 parent 298d005 commit df9b00d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • consul-populate-core/src/main/java/com/frogdevelopment/consul/populate/files

consul-populate-core/src/main/java/com/frogdevelopment/consul/populate/files/FilesImporter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ public Map<String, String> execute() {
6060
for (final var entry : merged.entrySet()) {
6161
final var key = FilenameUtils.removeExtension(entry.getKey());
6262
final var value = writeValueAsString(entry.getValue());
63-
result.put(key, value);
63+
if (value.isEmpty()) {
64+
log.warn("Skipping empty configurations for file '{}'", key);
65+
} else {
66+
result.put(key, value);
67+
}
6468
}
6569

6670
return result;

0 commit comments

Comments
 (0)