From 9f6505192c4a243f4c4930d4b51f8b023bf81a2e Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 28 Sep 2012 16:59:51 +0900 Subject: [PATCH] Simplify if --- .../netty/example/http/file/HttpStaticFileServerHandler.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java b/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java index eeaa3d65d5..75365fd74f 100644 --- a/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java +++ b/example/src/main/java/io/netty/example/http/file/HttpStaticFileServerHandler.java @@ -245,10 +245,7 @@ public class HttpStaticFileServerHandler extends ChannelInboundMessageHandlerAda buf.append("
  • ..
  • \r\n"); for (File f: dir.listFiles()) { - if (f.isHidden()) { - continue; - } - if (!f.canRead()) { + if (f.isHidden() || !f.canRead()) { continue; }