optimize some code (#9289)
Motivation: There is some manual coping of elements of Collections which can be replaced by Collections.addAll(...) and also some unnecessary semicolons. Modifications: - Simplify branches - Use Collections.addAll - Code cleanup Result: Code cleanup
This commit is contained in:
parent
8d43869369
commit
500bb5db8e
@ -477,12 +477,12 @@ final class ReplayingDecoderByteBuf extends ByteBuf {
|
||||
|
||||
@Override
|
||||
public boolean isReadable() {
|
||||
return terminated? buffer.isReadable() : true;
|
||||
return !terminated || buffer.isReadable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadable(int size) {
|
||||
return terminated? buffer.isReadable(size) : true;
|
||||
return !terminated || buffer.isReadable(size);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,7 +50,7 @@ public class Log4J2LoggerTest extends AbstractInternalLoggerTest<Logger> {
|
||||
result.put("level", level.name());
|
||||
result.put("t", t);
|
||||
super.logMessage(fqcn, level, marker, message, t);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user