Skip to content

Commit

Permalink
Merge pull request CESNET#3149 from Vojtech-Sassmann/fixConf
Browse files Browse the repository at this point in the history
Core - fixed optional ns config options
  • Loading branch information
Vojtech-Sassmann authored Apr 6, 2021
2 parents edd5059 + 43569ee commit eec8f2d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Map<String, NamespaceRules> loadSponsoredAccountsConfig() {

} catch(RuntimeException e) {
throw new InternalErrorException("Configuration file has invalid syntax. Configuration file: " +
configurationPath.getFilename());
configurationPath.getFilename(), e);
}

return namespacesRules;
Expand Down Expand Up @@ -69,9 +69,9 @@ private Set<NamespaceRules> loadNamespacesRulesFromJsonNode(JsonNode rootNode) {
namespaceRules.setDefaultEmail(defaultEmail.asText());
namespaceRules.setRequiredAttributes(requiredAttributes);
namespaceRules.setOptionalAttributes(optionalAttributes);
if (!csvGenHeader.isNull())
if (csvGenHeader != null && !csvGenHeader.isNull())
namespaceRules.setCsvGenHeader(csvGenHeader.asText());
if (!csvGenPlaceholder.isNull())
if (csvGenPlaceholder != null && !csvGenPlaceholder.isNull())
namespaceRules.setCsvGenPlaceholder(csvGenPlaceholder.asText());

rules.add(namespaceRules);
Expand Down

0 comments on commit eec8f2d

Please sign in to comment.