From 31ecd17212f9fe2e520824d23c9463b7bb46cffc Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Wed, 17 Jul 2013 21:16:52 +0900 Subject: [PATCH] Fix test failure --- .../test/java/io/netty/channel/local/LocalChannelTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/transport/src/test/java/io/netty/channel/local/LocalChannelTest.java b/transport/src/test/java/io/netty/channel/local/LocalChannelTest.java index 208b0bec27..8067846524 100644 --- a/transport/src/test/java/io/netty/channel/local/LocalChannelTest.java +++ b/transport/src/test/java/io/netty/channel/local/LocalChannelTest.java @@ -130,8 +130,10 @@ public class LocalChannelTest { assertThat(e, is(instanceOf(ClosedChannelException.class))); // Ensure that the actual write attempt on a closed channel was never made by asserting that // the ClosedChannelException has been created by AbstractUnsafe rather than transport implementations. - assertThat(e.getStackTrace()[0].getClassName(), is(AbstractChannel.class.getName() + "$AbstractUnsafe")); - e.printStackTrace(); + if (e.getStackTrace().length > 0) { + assertThat(e.getStackTrace()[0].getClassName(), is(AbstractChannel.class.getName() + "$AbstractUnsafe")); + e.printStackTrace(); + } } serverGroup.shutdownGracefully();