panbingkun commented on code in PR #45975: URL: https://github.com/apache/spark/pull/45975#discussion_r1560505992
########## common/utils/src/main/scala/org/apache/spark/internal/Logging.scala: ########## @@ -105,9 +108,10 @@ trait Logging { val context = new java.util.HashMap[String, String]() args.foreach { mdc => - sb.append(mdc.value.toString) + val value = if (mdc.value != null) mdc.value.toString else null Review Comment: Let me add a UT like this in `*LoggingSuite` to make it look clearer. done. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org