Check for null values
This commit is contained in:
parent
bd1bc534d8
commit
c7e276efe0
@ -28,6 +28,9 @@ class CompactObjectInputStream extends ObjectInputStream {
|
||||
|
||||
CompactObjectInputStream(InputStream in, ClassResolver classResolver) throws IOException {
|
||||
super(in);
|
||||
if (classResolver == null) {
|
||||
throw new NullPointerException("classResolver");
|
||||
}
|
||||
this.classResolver = classResolver;
|
||||
}
|
||||
|
||||
|
@ -92,6 +92,9 @@ public class ObjectDecoder extends LengthFieldBasedFrameDecoder {
|
||||
*/
|
||||
public ObjectDecoder(int maxObjectSize, ClassResolver classResolver) {
|
||||
super(maxObjectSize, 0, 4, 0, 4);
|
||||
if (classResolver == null) {
|
||||
throw new NullPointerException("classResolver");
|
||||
}
|
||||
this.classResolver = classResolver;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user