don't let guice by mistake inject two instances

This commit is contained in:
kimchy 2010-05-10 01:15:08 +03:00
parent 35c8774304
commit 7721b86995
2 changed files with 8 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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")