Fix FieldCapabilities compilation in Eclipse
Eclipse can't deal with the generics, maybe the fixed but
unreleased
@@ -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)
