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:47:25 UTC

[lucene-solr] branch branch_8x 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 branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


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

commit ec71a6b4540c0106d4bcb61e0d0d1e20c9f57973
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
    
    (cherry picked from commit 2ac640f9d066ebd88f4b5ebd1036792bdbf171bc)
---
 .../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 79b0c43..217e607 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
@@ -335,7 +335,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);