From 951ca5a8498a274bb272d3fece1dc1811670b70a Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Mon, 13 Nov 2023 12:37:16 -0600 Subject: [PATCH] Ensure LongWrapper is formatted as a Java long Fixes #4818 --- .../java/io/deephaven/web/client/api/i18n/JsNumberFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsNumberFormat.java b/web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsNumberFormat.java index 6bc69bc746d..1343053263d 100644 --- a/web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsNumberFormat.java +++ b/web/client-api/src/main/java/io/deephaven/web/client/api/i18n/JsNumberFormat.java @@ -162,7 +162,7 @@ public String format(NumberUnion number) { } else if (number.isBigInteger()) { return wrapped.format(number.asBigInteger().getWrapped()); } else if (number.isLongWrapper()) { - return wrapped.format(number.asLongWrapper().getWrapped()); + return wrapped.format((Long) number.asLongWrapper().getWrapped()); } throw new IllegalStateException("Can't format non-number object of type " + Js.typeof(number)); }