From cde667f668398b02d98b62f775aedadc64ad000e Mon Sep 17 00:00:00 2001 From: Korotaev Boris Date: Sat, 31 May 2014 13:36:50 +0600 Subject: [PATCH] Fix broken CompositeMatcher Motivation: ChannelMatchers#CompositeMatcher inverts matches result. Modifications: Switched return values. Result: ChannelMatchers#CompositeMatcher will return correct results. --- .../src/main/java/io/netty/channel/group/ChannelMatchers.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/group/ChannelMatchers.java b/transport/src/main/java/io/netty/channel/group/ChannelMatchers.java index 30635430e0..be91185585 100644 --- a/transport/src/main/java/io/netty/channel/group/ChannelMatchers.java +++ b/transport/src/main/java/io/netty/channel/group/ChannelMatchers.java @@ -121,10 +121,10 @@ public final class ChannelMatchers { public boolean matches(Channel channel) { for (int i = 0; i < matchers.length; i++) { if (!matchers[i].matches(channel)) { - return true; + return false; } } - return false; + return true; } }