Github user nkalmar commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/549#discussion_r198404697 --- Diff: src/java/test/org/apache/zookeeper/test/ReconfigTest.java --- @@ -801,10 +801,12 @@ private void testPortChangeToBlockedPort(boolean testLeader) throws Exception { @Test public void testUnspecifiedClientAddress() throws Exception { - int[] ports = new int[3]; - for (int port : ports) { - port = PortAssignment.unique(); - } + int[] ports = { + PortAssignment.unique(), + PortAssignment.unique(), + PortAssignment.unique() + }; + --- End diff -- Yes, they will fail otherwise with the introduced changes - all the ports were null. Also, this is just bad java code, the for does nothing, while the intention was clearly to set the ports for a unique number.
---