mimaison commented on code in PR #20077: URL: https://github.com/apache/kafka/pull/20077#discussion_r2318247211
########## connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java: ########## @@ -152,8 +152,6 @@ public JsonNode toJson(final Schema schema, final Object value, final JsonConver return switch (config.decimalFormat()) { case NUMERIC -> JSON_NODE_FACTORY.numberNode(decimal); case BASE64 -> JSON_NODE_FACTORY.binaryNode(Decimal.fromLogical(schema, decimal)); - default -> - throw new DataException("Unexpected " + JsonConverterConfig.DECIMAL_FORMAT_CONFIG + ": " + config.decimalFormat()); Review Comment: With enhanced switch blocks, the compiler ensures at compile time that all cases are covered, so the default branch is no longer needed. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org