Skip to content

Accept endpoint list as java.util.List #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michaelklishin opened this issue Jan 25, 2016 · 5 comments
Closed

Accept endpoint list as java.util.List #125

michaelklishin opened this issue Jan 25, 2016 · 5 comments

Comments

@michaelklishin
Copy link
Contributor

Using arrays only in 2016 is a little embarrassing, isn't it?

@michaelklishin
Copy link
Contributor Author

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.

@bdshroyer
Copy link

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?

@michaelklishin
Copy link
Contributor Author

Sure, lets switch the internal addresses field(s) to use List. Arrays are rarely used in modern Java.

bdshroyer pushed a commit to bdshroyer/rabbitmq-java-client that referenced this issue Jan 26, 2016
… as arrays.

* Public newConnection() methods that took arrays as inputs are still present, but wrap around list-based invocations.

Addresses [issue rabbitmq#125](rabbitmq#125).
michaelklishin pushed a commit that referenced this issue Jan 26, 2016
… as arrays.

* Public newConnection() methods that took arrays as inputs are still present, but wrap around list-based invocations.

Addresses [issue #125](#125).
@occho
Copy link

occho commented Mar 3, 2016

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.

public static Address[] parseAddresses(String addresses) {

@michaelklishin
Copy link
Contributor Author

@occho good idea. Well, we can't remove the array version yet, so…

stream-iori pushed a commit to stream-iori/rabbitmq-java-client that referenced this issue Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants