fix: fixed bugs in RequestDeserializer, and wrote Proptests for it
This commit is contained in:
@ -43,7 +43,9 @@ public class RequestDeserializer extends JsonDeserializer<Request> {
|
||||
.withTargetEntity(unwrap(node, "targetEntity", EntityID.class))
|
||||
.withOriginField(unwrap(node, "originField", IntVector2.class))
|
||||
.withTargetField(unwrap(node, "targetField", IntVector2.class))
|
||||
.withStoneType(unwrap(node, "stoneType", StoneType.class));
|
||||
.withStoneType(Optional.ofNullable(unwrap(node, "stoneType", EntityID.class))
|
||||
.map(x -> StoneType.valueOf(x.id))
|
||||
.orElseGet(() -> null));
|
||||
|
||||
switch (requestType) {
|
||||
case DisconnectRequest,
|
||||
|
Reference in New Issue
Block a user