don't let guice by mistake inject two instances
This commit is contained in:
parent
35c8774304
commit
7721b86995
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue