Skip to content
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

Fix JmxConnectionFactory.connectAny(..) to loop a second time trying all hosts regardless of past successes/failures #239

Merged

Conversation

michaelsembwever
Copy link
Member

No description provided.

@michaelsembwever michaelsembwever force-pushed the mck/fix-JmxConnectionFactory-connectAny-second-loop branch from 26a8235 to cf4e1b8 Compare October 18, 2017 11:06
michaelsembwever added a commit that referenced this pull request Oct 18, 2017
…all hosts regardless of past successes/failures.

ref: #239

for (int i = 0; i < 2; i++) {
while (hostIterator.hasNext()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this iterator was not being "reset" for the second loop, so the second loop never did anything…

Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that bug :D please merge

…all hosts regardless of past successes/failures.

ref: #239
@michaelsembwever michaelsembwever force-pushed the mck/fix-JmxConnectionFactory-connectAny-second-loop branch from cf4e1b8 to 4663b86 Compare October 19, 2017 10:52
@tlpsonarqube
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • INFO 1 info

Watch the comments in this conversation to review them.

String host = hostIterator.next();

for (String host : hostList) {
assert null != host; // @todo remove the null check in the following if condition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule

Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's merge

@adejanovski adejanovski merged commit 22afbdb into master Oct 19, 2017
@michaelsembwever michaelsembwever deleted the mck/fix-JmxConnectionFactory-connectAny-second-loop branch October 27, 2017 21:07
@adejanovski adejanovski added this to the 1.0.0 milestone Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants