Fix boundary check in DefaultChannelPipeline.addFirst(..)

- Thanks @normanmaurer
This commit is contained in:
Trustin Lee 2012-05-15 14:49:23 +09:00
parent e16c835780
commit 957c04e597

View File

@ -143,7 +143,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
if (handlers == null) {
throw new NullPointerException("handlers");
}
if (handlers[0] == null) {
if (handlers.length == 0 || handlers[0] == null) {
return this;
}