Properties dmaapConsumerConfig = new Properties();
JsonObject agentConfigJson = root.getAsJsonObject(CONFIG);
- List<RicConfig> ricConfigs = parseRics(agentConfigJson);
- Map<String, ControllerConfig> controllerConfigs = parseControllerConfigs(agentConfigJson);
+
+ if (agentConfigJson == null) {
+ throw new ServiceException("Missing root configuration \"" + CONFIG + "\" in JSON: " + root);
+ }
JsonObject json = agentConfigJson.getAsJsonObject("streams_publishes");
if (json != null) {
dmaapConsumerConfig = parseDmaapConfig(json);
}
+ List<RicConfig> ricConfigs = parseRics(agentConfigJson);
+ Map<String, ControllerConfig> controllerConfigs = parseControllerConfigs(agentConfigJson);
checkConfigurationConsistency(ricConfigs, controllerConfigs);
return ImmutableConfigParserResult.builder() //