Fix broken CompositeMatcher
Motivation: ChannelMatchers#CompositeMatcher inverts matches result. Modifications: Switched return values. Result: ChannelMatchers#CompositeMatcher will return correct results.
This commit is contained in:
parent
1347e7f312
commit
cde667f668
@ -121,12 +121,12 @@ public final class ChannelMatchers {
|
|||||||
public boolean matches(Channel channel) {
|
public boolean matches(Channel channel) {
|
||||||
for (int i = 0; i < matchers.length; i++) {
|
for (int i = 0; i < matchers.length; i++) {
|
||||||
if (!matchers[i].matches(channel)) {
|
if (!matchers[i].matches(channel)) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final class InvertMatcher implements ChannelMatcher {
|
private static final class InvertMatcher implements ChannelMatcher {
|
||||||
private final ChannelMatcher matcher;
|
private final ChannelMatcher matcher;
|
||||||
|
Loading…
Reference in New Issue
Block a user