Skip to content

fix(webui): ClassCastException displaying range component values - #12

Open
tipatterson-dev wants to merge 4 commits into
masterfrom
fix/webui-range-value-cast
Open

fix(webui): ClassCastException displaying range component values#12
tipatterson-dev wants to merge 4 commits into
masterfrom
fix/webui-range-value-cast

Conversation

@tipatterson-dev

Copy link
Copy Markdown

The admin UI's SWE component form casts every simple component to DataValue when rendering its latest value. Range components (QuantityRange, CountRange, TimeRange) are SimpleComponents but not DataValues, so expanding an output containing a range with values shown crashed the panel with a ClassCastException.

Fix: cast to SimpleComponent instead — SWEDataTypeUtils.getStringValue(SimpleComponent) already renders both scalars and ranges, so scalar behavior is unchanged.

Repro: browse any driver output containing a QuantityRange in the Admin UI with data present (e.g. a sensor reporting a min/max pair) and expand its structure.

philip-khaisman and others added 4 commits June 29, 2026 15:43
Range components (QuantityRange etc.) are SimpleComponents but not
DataValues, so rendering their latest value in the admin UI crashed.
getStringValue(SimpleComponent) handles scalars and ranges alike.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants