diff --git a/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java b/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java index ee91191bb4..a31e16461e 100644 --- a/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java @@ -16,6 +16,7 @@ package io.netty.handler.codec.protobuf; import com.google.protobuf.ExtensionRegistry; +import com.google.protobuf.ExtensionRegistryLite; import com.google.protobuf.Message; import com.google.protobuf.MessageLite; import io.netty.buffer.ByteBuf; @@ -78,7 +79,7 @@ public class ProtobufDecoder extends MessageToMessageDecoder { } private final MessageLite prototype; - private final ExtensionRegistry extensionRegistry; + private final ExtensionRegistryLite extensionRegistry; /** * Creates a new instance. @@ -88,6 +89,10 @@ public class ProtobufDecoder extends MessageToMessageDecoder { } public ProtobufDecoder(MessageLite prototype, ExtensionRegistry extensionRegistry) { + this(prototype, (ExtensionRegistryLite) extensionRegistry); + } + + public ProtobufDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry) { if (prototype == null) { throw new NullPointerException("prototype"); }