Archiviert
13
0

Only patch the encoder if it was found.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-12-08 14:34:55 +01:00
Ursprung b947ed1193
Commit be95fbc430

Datei anzeigen

@ -200,12 +200,12 @@ class ChannelInjector extends ByteToMessageDecoder {
// Get the vanilla decoder, so we don't have to replicate the work
vanillaDecoder = (ByteToMessageDecoder) originalChannel.pipeline().get("decoder");
vanillaEncoder = (MessageToByteEncoder<Object>) originalChannel.pipeline().get("encoder");
patchEncoder(vanillaEncoder);
if (vanillaDecoder == null)
throw new IllegalArgumentException("Unable to find vanilla decoder.in " + originalChannel.pipeline());
if (vanillaEncoder == null)
throw new IllegalArgumentException("Unable to find vanilla encoder in " + originalChannel.pipeline());
patchEncoder(vanillaEncoder);
if (DECODE_BUFFER == null)
DECODE_BUFFER = FuzzyReflection.getMethodAccessor(vanillaDecoder.getClass(),