From e86d957445e26910fd98b11173782668d45e15ec Mon Sep 17 00:00:00 2001 From: ShubhaOracle Date: Thu, 29 Feb 2024 13:10:32 -0500 Subject: [PATCH] Issue: Intermittent UI exception while opening the Import Virtual Machine(s) pop-up Signed-off-by: ShubhaOracle --- .../main/view/popup/storage/RegisterEntityInfoPanel.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/RegisterEntityInfoPanel.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/RegisterEntityInfoPanel.java index 2d3dcb5ba12..eba906e259c 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/RegisterEntityInfoPanel.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/storage/RegisterEntityInfoPanel.java @@ -312,8 +312,13 @@ protected Double getSpeed(VmNetworkInterface object) { AbstractTextColumn dropsColumn = new AbstractSumUpColumn() { @Override protected Double[] getRawValue(VmNetworkInterface object) { - Double receiveDrops = object != null ? object.getStatistics().getReceiveDrops().doubleValue() : null; - Double transmitDrops = object != null ? object.getStatistics().getTransmitDrops().doubleValue() : null; + Double receiveDrops = (object != null && object.getStatistics() != null + && object.getStatistics().getReceiveDrops() != null) + ? object.getStatistics().getReceiveDrops().doubleValue() : 0.0; + Double transmitDrops = (object != null && object.getStatistics() != null + && object.getStatistics().getTransmitDrops() != null) + ? object.getStatistics().getTransmitDrops().doubleValue() : 0.0; + return new Double[] { receiveDrops, transmitDrops }; } };