Fix npe when hessian deserialize (#10659)
* fix npe * fix npe when result is null * remove redundant code
This commit is contained in:
parent
ecd8ed815a
commit
d82687c493
@ -51,6 +51,9 @@ public class HessianSerializer implements Serializer {
|
||||
@Override
|
||||
public <T> T deserialize(byte[] data, Class<T> cls) {
|
||||
T result = deserialize(data);
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
if (cls.isAssignableFrom(result.getClass())) {
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user