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:
committed by
Phillip Webb
parent
04fdec6f8b
commit
4a189bdee7
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user