Fix Eclipse specific type casting issue (#37072)
The eclipse compiler needs some help in infering the functions return values.
This commit is contained in:
parent
51cb63f934
commit
8e6f68f6b0
|
@ -117,11 +117,13 @@ public class AutoFollowStats implements Writeable, ToXContentObject {
|
||||||
numberOfFailedRemoteClusterStateRequests = in.readVLong();
|
numberOfFailedRemoteClusterStateRequests = in.readVLong();
|
||||||
numberOfSuccessfulFollowIndices = in.readVLong();
|
numberOfSuccessfulFollowIndices = in.readVLong();
|
||||||
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
|
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
|
||||||
recentAutoFollowErrors = new TreeMap<>(in.readMap(StreamInput::readString,
|
// note: the casts to the following Writeable.Reader<T> instances are needed by some IDEs (e.g. Eclipse 4.8) as a compiler help
|
||||||
in1 -> new Tuple<>(in1.readZLong(), in1.readException())));
|
recentAutoFollowErrors = new TreeMap<>(in.readMap((Writeable.Reader<String>) StreamInput::readString,
|
||||||
|
(Writeable.Reader<Tuple<Long, ElasticsearchException>>) in1 -> new Tuple<>(in1.readZLong(), in1.readException())));
|
||||||
} else {
|
} else {
|
||||||
recentAutoFollowErrors = new TreeMap<>(in.readMap(StreamInput::readString,
|
// note: the casts to the following Writeable.Reader<T> instances are needed by some IDEs (e.g. Eclipse 4.8) as a compiler help
|
||||||
in1 -> new Tuple<>(-1L, in1.readException())));
|
recentAutoFollowErrors = new TreeMap<>(in.readMap((Writeable.Reader<String>) StreamInput::readString,
|
||||||
|
(Writeable.Reader<Tuple<Long, ElasticsearchException>>) in1 -> new Tuple<>(-1L, in1.readException())));
|
||||||
}
|
}
|
||||||
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
|
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
|
||||||
autoFollowedClusters = new TreeMap<>(in.readMap(StreamInput::readString, AutoFollowedCluster::new));
|
autoFollowedClusters = new TreeMap<>(in.readMap(StreamInput::readString, AutoFollowedCluster::new));
|
||||||
|
|
Loading…
Reference in New Issue