Skip to content

Commit

Permalink
Close Taskana#2200 - fix the exception text for wrong classification …
Browse files Browse the repository at this point in the history
…categoeries
  • Loading branch information
ryzheboka committed Jan 23, 2024
1 parent 7ef02cf commit 25a31dc
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ public static class Builder {
private static final Logger LOGGER = LoggerFactory.getLogger(Builder.class);
private static final String DEFAULT_TASKANA_PROPERTIES = "/taskana.properties";
private static final String DEFAULT_TASKANA_PROPERTY_SEPARATOR = "|";
private String separator = DEFAULT_TASKANA_PROPERTY_SEPARATOR;

// region general configuration
private final DataSource dataSource;
Expand Down Expand Up @@ -1037,6 +1038,7 @@ public Builder initTaskanaProperties(String propertiesFile, String separator) {
LOGGER.debug(
"Reading taskana configuration from {} with separator {}", propertiesFile, separator);
properties = loadProperties(propertiesFile);
this.separator = separator;
configureAnnotatedFields(separator, properties);
addMasterDomain();
return this;
Expand All @@ -1056,6 +1058,11 @@ public Builder enforceServiceLevel(boolean enforceServiceLevel) {
return this;
}

public Builder separator(String separator) {
this.separator = separator;
return this;
}

// endregion

// region authentication configuration
Expand Down Expand Up @@ -1451,8 +1458,9 @@ private void validateConfiguration() {
"Parameter classificationCategoriesByType (taskana.classification.categories.<KEY>)"
+ " contains invalid Classification Types. "
+ "configured: %s "
+ "detected: %s",
classificationTypes, classificationCategoriesByType.keySet()));
+ "existing: %s",
classificationTypes,
"[" + String.join(separator, classificationCategoriesByType.keySet()) + "]"));
}

if (!classificationCategoriesByType.keySet().containsAll(classificationTypes)) {
Expand Down

0 comments on commit 25a31dc

Please sign in to comment.