diff --git a/backend/src/main/java/djmil/cordacheckers/api/GameProposalController.java b/backend/src/main/java/djmil/cordacheckers/api/GameProposalController.java index 5f7b3f5..200069c 100644 --- a/backend/src/main/java/djmil/cordacheckers/api/GameProposalController.java +++ b/backend/src/main/java/djmil/cordacheckers/api/GameProposalController.java @@ -48,7 +48,6 @@ public class GameProposalController { final HoldingIdentity gpReceiver = holdingIdentityResolver.getByUsername(gpRequest.opponentName()); final Stone.Color gpReceiverColor = gpRequest.opponentColor(); - // GiteaIssue #4: Exception handling GameView gameStateView = cordaClient.gameProposalCreate( gpSender, gpReceiver, diff --git a/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java b/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java index 66af72a..dd59663 100644 --- a/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java +++ b/backend/src/main/java/djmil/cordacheckers/cordaclient/CordaClient.java @@ -4,6 +4,7 @@ import static java.util.Objects.requireNonNull; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -110,6 +111,9 @@ public class CordaClient { public GameView gameProposalCreate(HoldingIdentity issuer, HoldingIdentity acquier, Stone.Color acquierColor, Map board, String message) throws RspFailureException { + + board.values().removeIf(Objects::isNull); // '5=BLACK.MAN, 6=null, 7=BLACK.MAN, 8=null, 9=BLACK.MAN, 10=BLACK.MAN' + final RequestBody requestBody = new RequestBody( "gp.create-" + UUID.randomUUID(), "djmil.cordacheckers.gameproposal.CreateFlow",