From efb5e8bafbbe57e81bb3f710a0e2a9d73c235dbb Mon Sep 17 00:00:00 2001 From: Lukas Fey Date: Wed, 20 Nov 2024 09:34:33 +0100 Subject: [PATCH] handle invalid batchprocess revisions --- .../src/com/gip/xyna/xprc/xbatchmgmt/BatchProcess.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/com/gip/xyna/xprc/xbatchmgmt/BatchProcess.java b/server/src/com/gip/xyna/xprc/xbatchmgmt/BatchProcess.java index ff22cda99..3fe524269 100644 --- a/server/src/com/gip/xyna/xprc/xbatchmgmt/BatchProcess.java +++ b/server/src/com/gip/xyna/xprc/xbatchmgmt/BatchProcess.java @@ -17,6 +17,7 @@ */ package com.gip.xyna.xprc.xbatchmgmt; +import java.util.Objects; import java.util.Random; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; @@ -803,7 +804,13 @@ public boolean isTimedout() { * @return */ public boolean isInRevision(Long revision) { - return batchProcessArchiveData.getRevision().equals(revision); + Long batchProcessRevision = null; + try { + batchProcessRevision = batchProcessArchiveData.getRevision(); + } catch (IllegalArgumentException e) { + return false; + } + return Objects.equals(batchProcessRevision, revision); }