diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 3d6c5a12747..821f9facf51 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -391,6 +391,9 @@ Bug Fixes * SOLR-11130: V2Request in SolrJ should return the correct collection name so that the request is forwarded to the correct node (noble) + +* SOLR-11151: SolrInfoMBeanHandler.getDiff() ADD case non-functional: NPE when a bean value goes from null -> non-null. + (Steve Rowe) Optimizations ---------------------- diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java index 4faa466f4ee..f9a3c053cdc 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java @@ -209,14 +209,16 @@ public class SolrInfoMBeanHandler extends RequestHandlerBase { for(int i=0; i[^<]*", ""); + + LocalSolrQueryRequest req = lrf.makeRequest( + CommonParams.QT,"/admin/mbeans", + "stats","true", + CommonParams.WT,"xml", + "diff","true"); + req.setContentStreams(Collections.singletonList(new ContentStreamBase.StringStream(xml))); + xml = h.query(req); + + NamedList>> nl = SolrInfoMBeanHandler.fromXML(xml); + assertNotNull(((NamedList)nl.get("ADMIN").get("/admin/mbeans").get("stats")).get("ADD ADMIN./admin/mbeans.totalTime")); + } + @Test public void testXMLDiffWithExternalEntity() throws Exception { String file = getFile("mailing_lists.pdf").toURI().toASCIIString();