diff --git a/perun-core/src/main/java/cz/metacentrum/perun/core/impl/SponsoredAccountsConfigLoader.java b/perun-core/src/main/java/cz/metacentrum/perun/core/impl/SponsoredAccountsConfigLoader.java index 4b1ca89547..775e00245c 100644 --- a/perun-core/src/main/java/cz/metacentrum/perun/core/impl/SponsoredAccountsConfigLoader.java +++ b/perun-core/src/main/java/cz/metacentrum/perun/core/impl/SponsoredAccountsConfigLoader.java @@ -40,7 +40,7 @@ public Map loadSponsoredAccountsConfig() { } catch(RuntimeException e) { throw new InternalErrorException("Configuration file has invalid syntax. Configuration file: " + - configurationPath.getFilename()); + configurationPath.getFilename(), e); } return namespacesRules; @@ -69,9 +69,9 @@ private Set 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);