Fixed compilation errors in JDK 1.6 and 1.5 - was using 1.7 :-(
This commit is contained in:
parent
db1ee35228
commit
1ae5312777
@ -31,8 +31,6 @@ import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jboss.netty.channel.ChannelDownstreamHandler;
|
||||
import org.jboss.netty.channel.ChannelFactory;
|
||||
@ -174,7 +172,6 @@ public class BootstrapTest {
|
||||
|
||||
@Test
|
||||
public void shouldHaveOrderedPipelineWhenSetFromMap() {
|
||||
Logger.getGlobal().setLevel(Level.SEVERE);
|
||||
Map<String, ChannelHandler> m = new LinkedHashMap<String, ChannelHandler>();
|
||||
m.put("a", createMock(ChannelDownstreamHandler.class));
|
||||
m.put("b", createMock(ChannelDownstreamHandler.class));
|
||||
|
@ -98,7 +98,7 @@ public class ClientBootstrapTest {
|
||||
bootstrap.setOption(
|
||||
"remoteAddress",
|
||||
new InetSocketAddress(
|
||||
InetAddress.getLoopbackAddress(),
|
||||
InetAddress.getLocalHost(),
|
||||
serverSocket.socket().getLocalPort()));
|
||||
|
||||
ChannelFuture future = bootstrap.connect();
|
||||
@ -129,7 +129,7 @@ public class ClientBootstrapTest {
|
||||
bootstrap.setOption(
|
||||
"remoteAddress",
|
||||
new InetSocketAddress(
|
||||
InetAddress.getLoopbackAddress(),
|
||||
InetAddress.getLocalHost(),
|
||||
serverSocket.socket().getLocalPort()));
|
||||
bootstrap.setOption("localAddress", new InetSocketAddress(0));
|
||||
|
||||
@ -157,7 +157,7 @@ public class ClientBootstrapTest {
|
||||
expect(pipelineFactory.getPipeline()).andThrow(new ChannelPipelineException());
|
||||
replay(pipelineFactory);
|
||||
|
||||
bootstrap.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), 1));
|
||||
bootstrap.connect(new InetSocketAddress(InetAddress.getLocalHost(), 1));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
|
@ -104,7 +104,7 @@ public class ServerBootstrapTest {
|
||||
Socket socket = null;
|
||||
try {
|
||||
socket = new Socket(
|
||||
InetAddress.getLoopbackAddress(),
|
||||
InetAddress.getLocalHost(),
|
||||
((InetSocketAddress) channel.getLocalAddress()).getPort());
|
||||
|
||||
// Wait until the connection is open in the server side.
|
||||
@ -158,7 +158,7 @@ public class ServerBootstrapTest {
|
||||
expect(pipelineFactory.getPipeline()).andThrow(new ChannelPipelineException());
|
||||
replay(pipelineFactory);
|
||||
|
||||
bootstrap.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), 1));
|
||||
bootstrap.connect(new InetSocketAddress(InetAddress.getLocalHost(), 1));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
|
Loading…
Reference in New Issue
Block a user