SPARK-2355: StanzaError call .build()

This commit is contained in:
Sergey Ponomarev
2025-10-18 20:36:21 +03:00
committed by Guus der Kinderen
parent 988083fbc6
commit bc364b545b
3 changed files with 5 additions and 5 deletions

View File

@ -206,7 +206,7 @@ public class ReversiPlugin implements Plugin {
reply.setTo(invitation.getFrom());
reply.setStanzaId(invitation.getStanzaId());
reply.setType(IQ.Type.error);
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request."));
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request.").build());
try
{
SparkManager.getConnection().sendStanza(reply);
@ -299,7 +299,7 @@ public class ReversiPlugin implements Plugin {
GameOffer reply = new GameOffer();
reply.setTo(((ChatRoomImpl) room).getJID());
reply.setType(IQ.Type.error);
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User cancelled the invitation."));
reply.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User cancelled the invitation.").build());
try
{

View File

@ -247,7 +247,7 @@ public class TicTacToePlugin implements Plugin {
decline.addActionListener(e -> {
invitation.setType(IQ.Type.error);
invitation.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request."));
invitation.setError(StanzaError.getBuilder().setCondition(StanzaError.Condition.undefined_condition).setDescriptiveEnText("User declined your request.").build());
try {
SparkManager.getConnection().sendStanza(invitation);
} catch (SmackException.NotConnectedException | InterruptedException e1) {