Accept endpoint list as java.util.List
Using arrays only in 2016 is a little embarrassing, isn't it?
I should elaborate: ConnectionFactory#newConnection currently accepts an array of Addresses. Lists are much more common in modern Java. We cannot remove the existing method because it would break too many apps but we can introduce a new version of that method and switch to Lists internally. Then this can go into 3.6.x.
Is the internal switch to Lists part of the scope of this issue, or is it just to introduce a newConnection() method that accepts a List as an argument?
Sure, lets switch the internal addresses field(s) to use List. Arrays are rarely used in modern Java.
You might want to provide a new version of parseAddresses method returning List.
Providing both the methods returning Array and List can be confusing, though.
https://github.com/rabbitmq/rabbitmq-java-client/blob/bba45a8276c0c77505b2fc770192f2a2f2922de5/src/main/java/com/rabbitmq/client/Address.java#L83
@occho good idea. Well, we can't remove the array version yet, so…