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

Order list of rake installations for the dropdown #16

Merged
merged 3 commits into from
Mar 13, 2014

Conversation

punkle
Copy link
Contributor

@punkle punkle commented Mar 10, 2014

No description provided.

@cloudbees-pull-request-builder

plugins » rake-plugin #4 SUCCESS
This pull request looks good

@Override
public int compareTo(RubyInstallation other){
int last = this.name.compareTo(other.name);
return last == 0 ? this.name.compareTo(other.name) : last;
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the second call to compareTo() redundant, especially since name is immutable? In other words, why couldn't we simply return last?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point! I will change that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

- This change removes the redundation call to String compareTo
- It also adds a test for the compare to function
@punkle
Copy link
Contributor Author

punkle commented Mar 10, 2014

For some reason the pull request is not picking up my latest commit on my source branch.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@cloudbees-pull-request-builder

plugins » rake-plugin #5 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

plugins » rake-plugin #6 SUCCESS
This pull request looks good

olivierdagenais added a commit that referenced this pull request Mar 13, 2014
Order list of rake installations for the dropdown
@olivierdagenais olivierdagenais merged commit f5c57ee into jenkinsci:master Mar 13, 2014
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

4 participants