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 errors reported by error-prone #9817

Closed
wants to merge 1 commit into from

Conversation

sebastianmonte
Copy link
Contributor

I compiled elasticsearch with error-prone
(https://github.com/google/error-prone). This commit fixes the 13
errors reported by the tool.
@javanna
Copy link
Member

javanna commented Mar 21, 2015

HI @sebastianmonte thanks, looks good! Could you please sign our CLA so we can pull this in?

@sebastianmonte
Copy link
Contributor Author

Hi, thanks for the feedback. Actually I have already signed it (after the pull request). Should I do it again?

@javanna
Copy link
Member

javanna commented Mar 26, 2015

Hi @sebastianmonte I am sorry, maybe something went wrong, but I can't find your signed CLA. Would you mind trying again?

@sebastianmonte
Copy link
Contributor Author

Hi @javanna , I signed the agreement few minutes ago.

@javanna
Copy link
Member

javanna commented Mar 29, 2015

Thanks @sebastianmonte merged!

@javanna javanna closed this Mar 29, 2015
@@ -176,7 +176,7 @@ public ZenDiscovery(Settings settings, ClusterName clusterName, ThreadPool threa
this.rejoinOnMasterGone = settings.getAsBoolean(SETTING_REJOIN_ON_MASTER_GONE, true);

if (this.joinRetryAttempts < 1) {
throw new ElasticsearchIllegalArgumentException("'" + SETTING_JOIN_RETRY_ATTEMPTS + "' must be a positive number. got [" + this.SETTING_JOIN_RETRY_ATTEMPTS + "]");
throw new ElasticsearchIllegalArgumentException("'" + SETTING_JOIN_RETRY_ATTEMPTS + "' must be a positive number. got [" + SETTING_JOIN_RETRY_ATTEMPTS + "]");
Copy link

Choose a reason for hiding this comment

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

Shouldn't this be this.joinRetryAttempts in the message instead of printing the same constant twice?

Copy link
Member

Choose a reason for hiding this comment

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

yes I think this is an oversight. Do you want to send a PR to fix it?

Copy link

Choose a reason for hiding this comment

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

Hmm, I don't know anything about ElasticSearch, don't even use it – I just stumbled over this pull request as a showcase of error-prone. I don't think I have the time to set up my environment to do any proper PR or to test a change like this, sorry.

Copy link
Member

Choose a reason for hiding this comment

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

no worries, thanks for catching this @ePaul !

Copy link
Member

Choose a reason for hiding this comment

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

I had a look and the settings code has been dramatically improved with 5.0 already, hence this fix is not required any longer. Nothing to do then, but thanks again for pointing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants