changed logic to ack msg if stack is null

This commit is contained in:
ShvaykaD 2023-06-12 13:53:10 +03:00
parent f191357b90
commit e5a2712d89

View File

@ -64,12 +64,7 @@ public final class TbMsgProcessingCtx implements Serializable {
} }
public TbMsgProcessingStackItem pop() { public TbMsgProcessingStackItem pop() {
if (stack == null) { return stack == null || stack.isEmpty() ? null : stack.removeLast();
throw new RuntimeException("Stack is null!");
} else if (stack.isEmpty()) {
return null;
}
return stack.removeLast();
} }
public static TbMsgProcessingCtx fromProto(MsgProtos.TbMsgProcessingCtxProto ctx) { public static TbMsgProcessingCtx fromProto(MsgProtos.TbMsgProcessingCtxProto ctx) {