Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015-2022 Oak Ridge National Laboratory.
* Copyright (c) 2015-2024 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand All @@ -19,6 +19,7 @@

import org.epics.util.array.ListNumber;
import org.epics.vtype.Display;
import org.epics.vtype.DisplayProvider;
import org.epics.vtype.VBoolean;
import org.epics.vtype.VDouble;
import org.epics.vtype.VEnum;
Expand Down Expand Up @@ -62,9 +63,9 @@ public static int actualPrecision (final VType value, int precision)
{
if (precision < 0)
{
if (value instanceof VNumber)
if (value instanceof DisplayProvider)
{
final NumberFormat format = ( (VNumber) value ).getDisplay().getFormat();
final NumberFormat format = ( (DisplayProvider) value ).getDisplay().getFormat();
if (format instanceof DecimalFormat)
precision = ( (DecimalFormat) format ).getMaximumFractionDigits();
}
Expand Down