dsmiley commented on code in PR #4777:
URL: https://github.com/apache/solr/pull/4777#discussion_r3838747254


##########
solr/core/src/java/org/apache/solr/core/backup/BackupManager.java:
##########
@@ -224,7 +224,11 @@ public DocCollection readCollectionState(String 
collectionName) throws IOExcepti
       is.readBytes(arr, 0, (int) is.length());
       // set a default created date, we don't aim at reading actual zookeeper 
state. The restored
       // collection will have a new creation date when persisted in zookeeper.
-      ClusterState c_state = ClusterState.createFromJson(-1, arr, Set.of(), 
Instant.EPOCH, null);
+      @SuppressWarnings("unchecked")
+      Map<String, Object> stateMap =
+          arr.length == 0 ? Map.of() : (Map<String, Object>) 
Utils.fromJSON(arr, 0, arr.length);

Review Comment:
   there will always be a json file of non-zero length, I assume



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to