@@ -131,10 +131,11 @@ private void testModifyCollection() throws Exception {
131131 .getResponse ();
132132 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
133133 assertNotNull ("Cluster state should not be null" , cluster );
134- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
134+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
135135 assertNotNull ("Collections should not be null in cluster state" , collections );
136136 assertEquals (1 , collections .size ());
137- assertEquals ("25" , collections ._getStr (List .of (COLLECTION_NAME , "replicationFactor" ), null ));
137+ Map <?, ?> collectionProperties = (Map <?, ?>) collections .get (COLLECTION_NAME );
138+ assertEquals ("25" , collectionProperties .get ("replicationFactor" ));
138139
139140 params = new ModifiableSolrParams ();
140141 params .set ("action" , CollectionParams .CollectionAction .MODIFYCOLLECTION .toString ());
@@ -153,10 +154,11 @@ private void testModifyCollection() throws Exception {
153154 System .out .println (rsp );
154155 cluster = (NamedList <?>) rsp .get ("cluster" );
155156 assertNotNull ("Cluster state should not be null" , cluster );
156- collections = (NamedList < ?>) cluster .get ("collections" );
157+ collections = (Map <?, ?>) cluster .get ("collections" );
157158 assertNotNull ("Collections should not be null in cluster state" , collections );
158159 assertEquals (1 , collections .size ());
159- assertNull (collections ._getStr (List .of (COLLECTION_NAME , "replicationFactor" ), null ));
160+ collectionProperties = (Map <?, ?>) collections .get (COLLECTION_NAME );
161+ assertNull (collectionProperties .get ("replicationFactor" ));
160162
161163 params = new ModifiableSolrParams ();
162164 params .set ("action" , CollectionParams .CollectionAction .MODIFYCOLLECTION .toString ());
@@ -255,7 +257,7 @@ private void testNoConfigset() throws Exception {
255257 NamedList <?> rsp = client .request (req );
256258 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
257259 assertNotNull ("Cluster state should not be null" , cluster );
258- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
260+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
259261 assertNotNull ("Collections should not be null in cluster state" , collections );
260262 assertNotNull (
261263 "Testing to insure collections are returned" , collections .get (COLLECTION_NAME1 ));
@@ -282,7 +284,7 @@ private void assertCountsForRepFactorAndNrtReplicas(CloudSolrClient client, Stri
282284 NamedList <Object > rsp = client .request (request );
283285 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
284286 assertNotNull ("Cluster state should not be null" , cluster );
285- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
287+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
286288 assertNotNull ("Collections should not be null in cluster state" , collections );
287289 assertEquals (1 , collections .size ());
288290 @ SuppressWarnings ({"unchecked" })
@@ -304,7 +306,7 @@ private void clusterStatusWithCollectionAndShard() throws IOException, SolrServe
304306 NamedList <Object > rsp = client .request (request );
305307 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
306308 assertNotNull ("Cluster state should not be null" , cluster );
307- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
309+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
308310 assertNotNull ("Collections should not be null in cluster state" , collections );
309311 assertNotNull (collections .get (COLLECTION_NAME ));
310312 assertEquals (1 , collections .size ());
@@ -330,7 +332,7 @@ private void clusterStatusWithCollectionAndMultipleShards()
330332 NamedList <Object > rsp = request .process (client ).getResponse ();
331333 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
332334 assertNotNull ("Cluster state should not be null" , cluster );
333- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
335+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
334336 assertNotNull ("Collections should not be null in cluster state" , collections );
335337 assertNotNull (collections .get (COLLECTION_NAME ));
336338 assertEquals (1 , collections .size ());
@@ -465,7 +467,7 @@ private void clusterStatusNoCollection() throws Exception {
465467 NamedList <Object > rsp = client .request (request );
466468 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
467469 assertNotNull ("Cluster state should not be null" , cluster );
468- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
470+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
469471 assertNotNull ("Collections should not be null in cluster state" , collections );
470472 assertNotNull (collections .get (COLLECTION_NAME1 ));
471473 assertEquals (4 , collections .size ());
@@ -487,7 +489,7 @@ private void clusterStatusWithCollection() throws IOException, SolrServerExcepti
487489 NamedList <Object > rsp = client .request (request );
488490 NamedList <?> cluster = (NamedList <?>) rsp .get ("cluster" );
489491 assertNotNull ("Cluster state should not be null" , cluster );
490- NamedList <? > collections = (NamedList < ?>) cluster .get ("collections" );
492+ Map <?, ? > collections = (Map <?, ?>) cluster .get ("collections" );
491493 assertNotNull ("Collections should not be null in cluster state" , collections );
492494 assertEquals (1 , collections .size ());
493495 @ SuppressWarnings ({"unchecked" })
@@ -517,7 +519,7 @@ private void clusterStatusZNodeVersion() throws Exception {
517519 NamedList <Object > rsp = client .request (request );
518520 NamedList <Object > cluster = (NamedList <Object >) rsp .get ("cluster" );
519521 assertNotNull ("Cluster state should not be null" , cluster );
520- NamedList < Object > collections = (NamedList < Object >) cluster .get ("collections" );
522+ Map <?, ? > collections = (Map <?, ? >) cluster .get ("collections" );
521523 assertNotNull ("Collections should not be null in cluster state" , collections );
522524 assertEquals (1 , collections .size ());
523525 Map <String , Object > collection = (Map <String , Object >) collections .get (cname );
@@ -533,7 +535,7 @@ private void clusterStatusZNodeVersion() throws Exception {
533535
534536 rsp = client .request (request );
535537 cluster = (NamedList <Object >) rsp .get ("cluster" );
536- collections = (NamedList < Object >) cluster .get ("collections" );
538+ collections = (Map <?, ? >) cluster .get ("collections" );
537539 collection = (Map <String , Object >) collections .get (cname );
538540 Integer newVersion = (Integer ) collection .get ("znodeVersion" );
539541 assertNotNull (newVersion );
@@ -560,7 +562,7 @@ private void clusterStatusWithRouteKey() throws IOException, SolrServerException
560562 NamedList <Object > cluster = (NamedList <Object >) rsp .get ("cluster" );
561563 assertNotNull ("Cluster state should not be null" , cluster );
562564 @ SuppressWarnings ({"unchecked" })
563- NamedList < Object > collections = (NamedList < Object >) cluster .get ("collections" );
565+ Map <?, ? > collections = (Map <?, ? >) cluster .get ("collections" );
564566 assertNotNull ("Collections should not be null in cluster state" , collections );
565567 assertNotNull (collections .get (DEFAULT_COLLECTION ));
566568 assertEquals (1 , collections .size ());
@@ -607,7 +609,7 @@ private void clusterStatusAliasTest() throws Exception {
607609 DEFAULT_COLLECTION + "," + COLLECTION_NAME ,
608610 aliases .get ("myalias" ));
609611
610- NamedList < Object > collections = (NamedList < Object >) cluster .get ("collections" );
612+ Map <?, ? > collections = (Map <?, ? >) cluster .get ("collections" );
611613 assertNotNull ("Collections should not be null in cluster state" , collections );
612614 assertNotNull (collections .get (DEFAULT_COLLECTION ));
613615 Map <String , Object > collection = (Map <String , Object >) collections .get (DEFAULT_COLLECTION );
@@ -627,7 +629,7 @@ private void clusterStatusAliasTest() throws Exception {
627629
628630 cluster = (NamedList <Object >) rsp .get ("cluster" );
629631 assertNotNull ("Cluster state should not be null" , cluster );
630- collections = (NamedList < Object >) cluster .get ("collections" );
632+ collections = (Map <?, ? >) cluster .get ("collections" );
631633 assertNotNull ("Collections should not be null in cluster state" , collections );
632634 assertNotNull (collections .get (DEFAULT_COLLECTION ));
633635 assertNotNull (collections .get (COLLECTION_NAME ));
0 commit comments