Skip to content

Refactor and polish with Java 8 idioms #9781

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
wants to merge 8 commits into from
Closed

Refactor and polish with Java 8 idioms #9781

wants to merge 8 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jul 18, 2017

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 18, 2017
@ghost
Copy link
Author

ghost commented Jul 18, 2017

I've separated each refactor in different commits so the review can be focused on that particular improvement. I can squash them all if you prefer.

@ghost ghost closed this Jul 20, 2017
@ghost ghost reopened this Jul 20, 2017
@ghost
Copy link
Author

ghost commented Jul 20, 2017

@philwebb @wilkinsona if you think that this PR could be considered at some point I can keep this branch up to date. If you want to reduce the scope of it or just discard it altogether please let me know.

@philwebb philwebb self-assigned this Jul 24, 2017
@philwebb philwebb changed the title Refactor and polish with new idioms Refactor and polish with Java 8 idioms Jul 25, 2017
@philwebb philwebb added type: enhancement A general enhancement priority: normal and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 25, 2017
@philwebb philwebb added this to the 2.0.0.M3 milestone Jul 25, 2017
philwebb pushed a commit that referenced this pull request Jul 25, 2017
Where possible, explicit generic declarations to use the Java 8 diamond
operator.

See gh-9781
philwebb pushed a commit that referenced this pull request Jul 25, 2017
Replace existing `Collections.sort(...)` calls with `.sort(...)`
directly on the collection instance.

See gh-9781
philwebb pushed a commit that referenced this pull request Jul 25, 2017
Use multi-catch for exceptions whenever possible.

See gh-9781
philwebb pushed a commit that referenced this pull request Jul 25, 2017
Update existing try/finally/close blocks to use "try with resources"

See gh-9781
philwebb pushed a commit that referenced this pull request Jul 25, 2017
Replace anonymous inner classes with lambda declarations (when possible
using method references).

See gh-9781
philwebb pushed a commit that referenced this pull request Jul 25, 2017
philwebb added a commit that referenced this pull request Jul 25, 2017
…-idioms

* pr/9781:
  Simplify comparator implementation
  Use lambdas when possible
  Replace try with try-with-resources
  Collapse catch clauses
  Replace Collections.sort() with direct sort call
  Replace explicit generics with diamond operator
@philwebb philwebb closed this Jul 25, 2017
@philwebb
Copy link
Member

Thanks very much for the PR. This has been merged to master with some changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants