andymg3 commented on code in PR #12892:
URL: https://github.com/apache/kafka/pull/12892#discussion_r1037477576


##########
metadata/src/test/java/org/apache/kafka/metadata/placement/StripedReplicaPlacerTest.java:
##########
@@ -95,12 +94,7 @@ private List<List<Integer>> place(
         PlacementSpec placementSpec = new PlacementSpec(startPartition,
             numPartitions,
             replicationFactor);
-        ClusterDescriber cluster = new ClusterDescriber() {
-            @Override
-            public Iterator<UsableBroker> usableBrokers() {
-                return brokers.iterator();
-            }
-        };
+        ClusterDescriber cluster = () -> brokers.iterator();

Review Comment:
   Same as above. That actually doesn't compile:
   ```
   > Task :metadata:compileTestJava FAILED
   ... 
/kafka/metadata/src/test/java/org/apache/kafka/metadata/placement/StripedReplicaPlacerTest.java:97:
 error: incompatible types: bad return type in lambda expression
           ClusterDescriber cluster = () -> brokers::iterator;
                                            ^
       java.util.Iterator is not a functional interface
         multiple non-overriding abstract methods found in interface 
java.util.Iterator
   1 error
   ```



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to