Skip to content

Commit

Permalink
core: Avoid NPE on missing configuration sections.
Browse files Browse the repository at this point in the history
  • Loading branch information
j-coll committed Jun 4, 2019
1 parent e58bc1c commit d2ac820
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.OutputStream;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -69,6 +70,16 @@ public class Configuration {
}

public Configuration() {
admin = new Admin();
monitor = new Monitor();
healthCheck = new HealthCheck();
execution = new Execution();
audit = new Audit();
hooks = new HashMap<>();
email = new Email();
catalog = new Catalog();
server = new ServerConfiguration();
authentication = new Authentication();
}

public void serialize(OutputStream configurationOututStream) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public HealthCheck setInterval(int interval) {
}

public HealthCheck() {
interval = 30;
}

@Override
Expand Down

0 comments on commit d2ac820

Please sign in to comment.