andymg3 commented on code in PR #12892: URL: https://github.com/apache/kafka/pull/12892#discussion_r1037475316
########## metadata/src/test/java/org/apache/kafka/controller/ClusterControlManagerTest.java: ########## @@ -407,13 +405,8 @@ public void testPlaceReplicas(int numUsableBrokers) throws Exception { new PlacementSpec(0, 1, (short) 3), - new ClusterDescriber() { - @Override - public Iterator<UsableBroker> usableBrokers() { - return clusterControl.usableBrokers(); - } - } - ); + () -> clusterControl.usableBrokers() Review Comment: ``` +++ b/metadata/src/test/java/org/apache/kafka/controller/ClusterControlManagerTest.java @@ -405,7 +405,7 @@ public class ClusterControlManagerTest { new PlacementSpec(0, 1, (short) 3), - () -> clusterControl.usableBrokers() + () -> clusterControl::usableBrokers ).assignments(); HashSet<Integer> seen = new HashSet<>(); for (Integer result : results.get(0).replicas()) { agrant@C02GN0121PG2 kafka % ./gradlew jar > Configure project : Starting build with version 3.4.0-SNAPSHOT (commit id 4ac9307e) using Gradle 7.6, Java 1.8 and Scala 2.13.8 Build properties: maxParallelForks=12, maxScalacThreads=8, maxTestRetries=0 > Task :metadata:compileTestJava FAILED /Users/agrant/workspace/kafka/metadata/src/test/java/org/apache/kafka/controller/ClusterControlManagerTest.java:408: error: incompatible types: bad return type in lambda expression () -> clusterControl::usableBrokers ^ java.util.Iterator is not a functional interface multiple non-overriding abstract methods found in interface java.util.Iterator Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 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