Replace Collections.sort() with direct sort call

Replace existing `Collections.sort(...)` calls with `.sort(...)`
directly on the collection instance.

See gh-9781
This commit is contained in:
Emanuel Campolo
2017-07-18 11:51:31 -03:00
committed by Phillip Webb
parent 04fdec6f8b
commit 4a189bdee7
15 changed files with 16 additions and 20 deletions

View File

@@ -199,7 +199,7 @@ public class EndpointDocumentation {
private Collection<? extends MvcEndpoint> getEndpoints() {
List<? extends MvcEndpoint> endpoints = new ArrayList<>(
this.mvcEndpoints.getEndpoints());
Collections.sort(endpoints, new Comparator<MvcEndpoint>() {
endpoints.sort(new Comparator<MvcEndpoint>() {
@Override
public int compare(MvcEndpoint o1, MvcEndpoint o2) {
return o1.getPath().compareTo(o2.getPath());