You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ds...@apache.org on 2020/05/20 13:46:54 UTC

[lucene-solr] branch master updated: SOLR-14484: avoid putting null into MDC Co-authored-by: Andras Salamon

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ac640f  SOLR-14484: avoid putting null into MDC Co-authored-by: Andras Salamon
2ac640f is described below

commit 2ac640f9d066ebd88f4b5ebd1036792bdbf171bc
Author: David Smiley <ds...@salesforce.com>
AuthorDate: Wed May 20 09:46:15 2020 -0400

    SOLR-14484: avoid putting null into MDC
    Co-authored-by: Andras Salamon
---
 .../apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
index ea0f773..0883e7f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
@@ -329,7 +329,7 @@ public class ConcurrentUpdateHttp2SolrClient extends SolrClient {
 
   // *must* be called with runners monitor held, e.g. synchronized(runners){ addRunner() }
   private void addRunner() {
-    MDC.put("ConcurrentUpdateHttp2SolrClient.url", client.getBaseURL());
+    MDC.put("ConcurrentUpdateHttp2SolrClient.url", String.valueOf(client.getBaseURL())); // MDC can't have null value
     try {
       Runner r = new Runner();
       runners.add(r);