Skip to content

Commit

Permalink
core: Fix typo on unused configuration field. #TASK-5888
Browse files Browse the repository at this point in the history
  • Loading branch information
j-coll committed May 8, 2024
1 parent f661aeb commit 9aae8c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public AbstractServerConfiguration setPort(int port) {

@Deprecated
protected void setLogFile(Object o) {
Configuration.reportUnusedField("configuration.yml#server.rest.maxLimit", o);
Configuration.reportUnusedField("configuration.yml#server.[rest|grpc].logFile", o);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ private static void overwriteWithEnvironmentVariables(Configuration configuratio
}

public static void reportUnusedField(String field, Object value) {
// Report only if the value is not null and not an empty string
if (value != null && !(value instanceof String && ((String) value).isEmpty())) {
if (reportedFields.add(field)) {
// Only log the first time a field is found
logger.warn("Ignored configuration option '{}' with value '{}'. The option was deprecated and removed.", field, value);
}
}
Expand Down

0 comments on commit 9aae8c1

Please sign in to comment.