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 Feb 9, 2024
1 parent 7ef02cf commit fc63e49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ void should_ThrowInvalidArgumentEx_When_ClassificationTypesDoesNotExist() {
"Parameter classificationCategoriesByType "
+ "(taskana.classification.categories.<KEY>) "
+ "contains invalid Classification Types."
+ " configured: [VALID] detected: [DOES_NOT_EXIST]");
+ " configured: [VALID] existing: [DOES_NOT_EXIST]");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,6 @@ public Builder enforceServiceLevel(boolean enforceServiceLevel) {
this.enforceServiceLevel = enforceServiceLevel;
return this;
}

// endregion

// region authentication configuration
Expand Down Expand Up @@ -1447,12 +1446,11 @@ private void validateConfiguration() {
if (!new HashSet<>(classificationTypes)
.containsAll(classificationCategoriesByType.keySet())) {
throw new InvalidArgumentException(
String.format(
"Parameter classificationCategoriesByType (taskana.classification.categories.<KEY>)"
+ " contains invalid Classification Types. "
+ "configured: %s "
+ "detected: %s",
classificationTypes, classificationCategoriesByType.keySet()));
+ " is configured incorrectly. Please check whether all specified Classification"
+ " Types exist. Additionally, check whether the correct separator is used in"
+ " the property taskana.classification.types ."
);
}

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

0 comments on commit fc63e49

Please sign in to comment.