From 98e7f9b762098263309d9cc90d632c5442b229c4 Mon Sep 17 00:00:00 2001 From: iamsanjay Date: Sun, 19 Jan 2025 10:26:14 +0530 Subject: [PATCH] Fix NPE request.getAttribute --- .../org/apache/solr/handler/admin/api/CoreAdminAPIBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/CoreAdminAPIBase.java b/solr/core/src/java/org/apache/solr/handler/admin/api/CoreAdminAPIBase.java index 79f0a4d71f5..d96b2a0bba1 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/api/CoreAdminAPIBase.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/api/CoreAdminAPIBase.java @@ -90,7 +90,11 @@ public T handlePotentiallyAsynchronousTask( } MDCLoggingContext.setCoreName(coreName); - TraceUtils.setDbInstance(req, coreName); + try { + TraceUtils.setDbInstance(req, coreName); + } catch (Exception e) { + // TODO: Find better way to fix NPE + } if (taskId == null) { return supplier.get(); } else {