From a788c20d26ba2f4034309459a08d9062feb06242 Mon Sep 17 00:00:00 2001 From: Espen Waaga <36693523+espenwaaga@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:42:50 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Count=20for=20antall=20prosesstask=20som?= =?UTF-8?q?=20ikke=20tok=20h=C3=B8yde=20for=20return=20typen=E2=80=A6=20(#?= =?UTF-8?q?718)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … fra postgres --- .../felles/prosesstask/impl/TaskManagerRepositoryImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/task/src/main/java/no/nav/vedtak/felles/prosesstask/impl/TaskManagerRepositoryImpl.java b/task/src/main/java/no/nav/vedtak/felles/prosesstask/impl/TaskManagerRepositoryImpl.java index 5ffa28a..df95bcc 100644 --- a/task/src/main/java/no/nav/vedtak/felles/prosesstask/impl/TaskManagerRepositoryImpl.java +++ b/task/src/main/java/no/nav/vedtak/felles/prosesstask/impl/TaskManagerRepositoryImpl.java @@ -2,8 +2,6 @@ import java.io.IOException; import java.lang.management.ManagementFactory; -import java.math.BigDecimal; -import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; @@ -456,10 +454,9 @@ Map countTasksForStatus(Set statu } private int intValueFromCount(Object o) { - return o instanceof BigInteger bi ? bi.intValue() : (o instanceof BigDecimal bd ? bd.intValue() : 0); + return o instanceof Number number ? number.intValue() : 0; } - static synchronized String getJvmUniqueProcessName() { return ManagementFactory.getRuntimeMXBean().getName(); }