shubhamsrkdev commented on code in PR #16282:
URL: https://github.com/apache/lucene/pull/16282#discussion_r3458731224


##########
lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java:
##########
@@ -867,6 +867,10 @@ public static FixedBitSet copyOf(Bits bits) {
 
     if (bits instanceof FixedBitSet fbs) {
       return fbs.clone();
+    } else if (bits instanceof DenseLiveDocs denseLiveDocs) {
+      return denseLiveDocs.toFixedBitSet();
+    } else if (bits instanceof SparseLiveDocs sparseLiveDocs) {
+      return sparseLiveDocs.toFixedBitSet();

Review Comment:
   Can we have an interface (Have FixedBitSet, DenseLiveDocs, and 
SparseLiveDocs all implement it) which could be used here instead of multiple 
if/else if?



-- 
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