Author: elecharny Date: Tue Nov 11 12:12:16 2008 New Revision: 713151 URL: http://svn.apache.org/viewvc?rev=713151&view=rev Log: Removed useless tests : the getDecoderOut() can't return a null value.
Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java Modified: mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java?rev=713151&r1=713150&r2=713151&view=diff ============================================================================== --- mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java (original) +++ mina/trunk/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java Tue Nov 11 12:12:16 2008 @@ -234,19 +234,6 @@ ProtocolDecoderOutput decoderOut = getDecoderOut(session, nextFilter); - if ( decoderOut == null) { - // The decoderOut must not be null. It's null if - // the sessionCreated message has not be called, for - // instance if the filter has been added after the - // first session is created. - ProtocolDecoderException pde = new ProtocolDecoderException( - "Cannot decode if the decoder is null. Add the filter in the chain" + - "before the first session is created" ); - nextFilter.exceptionCaught(session, pde); - return; - } - - // Loop until we don't have anymore byte in the buffer, // or until the decoder throws an unrecoverable exception or // can't decoder a message, because there are not enough @@ -402,18 +389,6 @@ ProtocolDecoder decoder = getDecoder(session); ProtocolDecoderOutput decoderOut = getDecoderOut(session, nextFilter); - if ( decoderOut == null) { - // The decoder must not be null. It's null if - // the sessionCreated message has not be called, for - // instance if the filter has been added after the - // first session is created. - ProtocolDecoderException pde = new ProtocolDecoderException( - "Cannot decode if the decoder is null. Add the filter in the chain" + - "before the first session is created" ); - nextFilter.exceptionCaught(session, pde); - return; - } - try { decoder.finishDecode(session, decoderOut); } catch (Throwable t) {