pranavbhole commented on code in PR #15056:
URL: https://github.com/apache/druid/pull/15056#discussion_r1340868777


##########
processing/src/main/java/org/apache/druid/java/util/common/StringUtils.java:
##########
@@ -373,16 +373,24 @@ public static String nonStrictFormat(String message, 
Object... formatArgs)
     if (formatArgs == null || formatArgs.length == 0) {
       return message;
     }
+    if (message == null) {

Review Comment:
   Preconditions check will throw an exception again.   Some of the exceptions 
are not having message at all and we are calling nonStrictFormat while making 
DruidException, esp exception from third party library. As the name says, 
expectation from nonStrictFormat in this case is that it should just give back 
some non null string. Best case effort is to append the args to string and give 
it back.
   
   If we add precondition then we need to safeguard the invoker lines with not 
null.



-- 
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]

Reply via email to