gianm commented on PR #15056: URL: https://github.com/apache/druid/pull/15056#issuecomment-1740279480
Anything that is calling `StringUtils.nonStrictFormat` with a `null` format string is a bug. In the case of #15055, the bug is that `QueryExceptionCompat#makeException` calls `druidException.build(exception, exception.getMessage())`. The `build` method expects a format string in the second parameter. The call should instead be `.build(exception, "%s", exception.getMessage())`. IMO, better to fix the above bug than to work around it in `StringUtils#nonStrictFormat`. Btw, looking at other calls to `DruidException#build` I see a bunch of places that have the same problem, where they pass a regular string instead of a format string. Many of them should be changed from `build(e, s)` to `build(e, "%s", s)`. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
