resource leak: Formatter was never closed

This commit is contained in:
radimch 2013-08-09 12:12:46 +02:00 committed by Norman Maurer
parent 9d8c4ded50
commit 0d6a6bde04

View File

@ -48,8 +48,10 @@ public class FactorialServerHandler extends SimpleChannelInboundHandler<BigInteg
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
logger.info(new Formatter().format(
Formatter fmt = new Formatter();
logger.info(fmt.format(
"Factorial of %,d is: %,d", lastMultiplier, factorial).toString());
fmt.close();
}
@Override