diff --git a/core/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilities.java b/core/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilities.java index 1ac78728b0d..ef7513f38ab 100644 --- a/core/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilities.java +++ b/core/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilities.java @@ -227,7 +227,9 @@ public class FieldCapabilities implements Writeable, ToXContent { FieldCapabilities build(boolean withIndices) { final String[] indices; - Collections.sort(indiceList, Comparator.comparing(o -> o.name)); + /* Eclipse can't deal with o -> o.name, maybe because of + * https://bugs.eclipse.org/bugs/show_bug.cgi?id=511750 */ + Collections.sort(indiceList, Comparator.comparing((IndexCaps o) -> o.name)); if (withIndices) { indices = indiceList.stream() .map(caps -> caps.name)