Fix FieldCapabilities compilation in Eclipse (#23855)
Eclipse can't deal with the generics, maybe the fixed but unreleased https://bugs.eclipse.org/bugs/show_bug.cgi?id=511750
This commit is contained in:
parent
ebd74f09cf
commit
ba62229f47
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue