diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransportManagement.java b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransportManagement.java index 55ddd33c0ed..1202567a291 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransportManagement.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/local/LocalTransportManagement.java @@ -19,8 +19,9 @@ package org.elasticsearch.transport.local; -import org.elasticsearch.util.guice.inject.Inject; import org.elasticsearch.jmx.MBean; +import org.elasticsearch.transport.Transport; +import org.elasticsearch.util.guice.inject.Inject; /** * @author kimchy (Shay Banon) @@ -30,7 +31,7 @@ public class LocalTransportManagement { private final LocalTransport transport; - @Inject public LocalTransportManagement(LocalTransport transport) { - this.transport = transport; + @Inject public LocalTransportManagement(Transport transport) { + this.transport = (LocalTransport) transport; } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransportManagement.java b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransportManagement.java index 2223f1e8509..4091e17d16b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransportManagement.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/netty/NettyTransportManagement.java @@ -19,9 +19,10 @@ package org.elasticsearch.transport.netty; -import org.elasticsearch.util.guice.inject.Inject; import org.elasticsearch.jmx.MBean; import org.elasticsearch.jmx.ManagedAttribute; +import org.elasticsearch.transport.Transport; +import org.elasticsearch.util.guice.inject.Inject; /** * @author kimchy (Shay Banon) @@ -31,8 +32,8 @@ public class NettyTransportManagement { private final NettyTransport transport; - @Inject public NettyTransportManagement(NettyTransport transport) { - this.transport = transport; + @Inject public NettyTransportManagement(Transport transport) { + this.transport = (NettyTransport) transport; } @ManagedAttribute(description = "Number of connections this node has to other nodes")