reschke commented on code in PR #1426: URL: https://github.com/apache/jackrabbit-oak/pull/1426#discussion_r1596559539
########## oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java: ########## @@ -555,25 +555,25 @@ private void logAdditionalMessages() { for (SelectorImpl s : selectors) { if (s.getExecutionPlan() != null && s.getExecutionPlan().getIndexPlan() != null) { - s.getExecutionPlan().getIndexPlan().getAdditionalMessages().forEach((level, list) -> { + s.getExecutionPlan().getIndexPlan().getAdditionalLogMessages().forEach((level, list) -> { switch (level) { - case TRACE: for (String msg : list) { + case "TRACE": for (String msg : list) { LOG.trace(msg); } break; - case DEBUG: for (String msg : list) { + case "DEBUG": for (String msg : list) { LOG.debug(msg); } break; - case INFO: for (String msg : list) { + case "INFO": for (String msg : list) { LOG.info(msg); } break; - case WARN: for (String msg : list) { + case "WARN": for (String msg : list) { LOG.warn(msg); } break; - case ERROR: for (String msg : list) { + case "ERROR": for (String msg : list) { LOG.error(msg); } break; Review Comment: maybe also align the whitespace before "break" (yes, the issue has been around before) ########## oak-query-spi/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java: ########## @@ -361,17 +364,32 @@ default boolean logWarningForPathFilterMismatch() { * This method can be used for communicating any messages which should be logged if this plan is selected for execution. * The messages are returned as a map whose key indicates log level and value is a list of messages against that * log level. + + * @deprecated use {@link #getAdditionalLogMessages()} instead * @return map containing log messages. */ + @Deprecated(forRemoval = true) default Map<Level, List<String>> getAdditionalMessages() { - return Collections.emptyMap(); + LoggerFactory.getLogger(QueryIndex.IndexPlan.class).warn("use of deprecated API - this method is going to be removed in future Oak releases - see OAK-10768 for details"); Review Comment: Can you add a Logger variable, so that this logging statement uses a style consistent with the rest of the codebase? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org