Use FrameDecoder.setMaxCumulationBufferComponents(Integer.MAX_VALUE) for Decoders that needs to handle big frames. See #424
This commit is contained in:
parent
28a1992bf4
commit
a746b5d3fe
@ -55,6 +55,7 @@ public class CompatibleMarshallingDecoder extends ReplayingDecoder<VoidEnum> {
|
||||
public CompatibleMarshallingDecoder(UnmarshallerProvider provider, int maxObjectSize) {
|
||||
this.provider = provider;
|
||||
this.maxObjectSize = maxObjectSize;
|
||||
setMaxCumulationBufferComponents(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,6 +57,7 @@ public class MarshallingDecoder extends LengthFieldBasedFrameDecoder {
|
||||
public MarshallingDecoder(UnmarshallerProvider provider, int maxObjectSize) {
|
||||
super(maxObjectSize, 0, 4, 0, 4);
|
||||
this.provider = provider;
|
||||
setMaxCumulationBufferComponents(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,6 +61,7 @@ public class CompatibleObjectDecoder extends ReplayingDecoder<CompatibleObjectDe
|
||||
*/
|
||||
public CompatibleObjectDecoder() {
|
||||
super(CompatibleObjectDecoderState.READ_HEADER);
|
||||
setMaxCumulationBufferComponents(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,6 +93,7 @@ public class ObjectDecoder extends LengthFieldBasedFrameDecoder {
|
||||
public ObjectDecoder(int maxObjectSize, ClassResolver classResolver) {
|
||||
super(maxObjectSize, 0, 4, 0, 4);
|
||||
this.classResolver = classResolver;
|
||||
setMaxCumulationBufferComponents(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user