From 5e69955d23d7f72ea1b3f8f4a909992577636a60 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Mon, 16 Dec 2013 16:16:37 +0900 Subject: [PATCH] Fix another buffer leak in XmlFrameDecoderTest --- .../netty/handler/codec/xml/XmlFrameDecoderTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/codec/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java b/codec/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java index dc43aa000d..f9c509946c 100644 --- a/codec/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java +++ b/codec/src/test/java/io/netty/handler/codec/xml/XmlFrameDecoderTest.java @@ -162,9 +162,13 @@ public class XmlFrameDecoderTest { actual.add(cause.getClass()); } - List expectedList = new ArrayList(); - Collections.addAll(expectedList, expected); - assertThat(actual, is(expectedList)); + try { + List expectedList = new ArrayList(); + Collections.addAll(expectedList, expected); + assertThat(actual, is(expectedList)); + } finally { + ch.finish(); + } } private String sample(String number) throws IOException, URISyntaxException {