Skip to content

Commit

Permalink
Fix: Count for antall prosesstask som ikke tok høyde for return typen… (
Browse files Browse the repository at this point in the history
#718)

… fra postgres
  • Loading branch information
espenwaaga authored Oct 29, 2024
1 parent 7a9d52e commit a788c20
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -456,10 +454,9 @@ Map<ProsessTaskStatus, Integer> countTasksForStatus(Set<ProsessTaskStatus> 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();
}
Expand Down

0 comments on commit a788c20

Please sign in to comment.