Skip to content

Fix non-Value attribute writes#1792

Merged
kevinherron merged 1 commit into
eclipse-milo:mainfrom
kevinherron:codex/fix-non-value-attribute-writes
Jul 2, 2026
Merged

Fix non-Value attribute writes#1792
kevinherron merged 1 commit into
eclipse-milo:mainfrom
kevinherron:codex/fix-non-value-attribute-writes

Conversation

@kevinherron

Copy link
Copy Markdown
Contributor

Summary

Fix server-side Write handling for non-Value attributes so requests write the raw attribute value instead of the surrounding DataValue wrapper. Invalid or incompatible payloads now return operation StatusCode results instead of bubbling unchecked setter exceptions.

  • Unwrap non-Value Write payloads before dispatching to node attribute setters, while preserving existing Value attribute behavior.
  • Convert wire-decoded enum, option-set, and structured forms into the concrete Java types expected by the built-in setters.
  • Add integration coverage for writable non-Value attributes and type mismatch handling.

Key Changes

  • Attribute conversion: Non-Value writes now go through a conversion helper keyed by AttributeId, including special handling for NodeClass, option sets, DataTypeDefinition, and role permission arrays.
  • Error mapping: Invalid converted values return Bad_TypeMismatch, and UaRuntimeException status codes are preserved instead of escaping the Write service path.
  • Regression coverage: AttributeWriterTest now exercises remote Write requests for DisplayName, ArrayDimensions, AccessLevelEx, and mismatched non-Value payloads.

References

Non-Value Write requests carry DataValue wrappers, but node setters expect raw
attribute values. Unwrap and validate or convert values before setter dispatch
so invalid writes return StatusCode results instead of unchecked exceptions.
@kevinherron kevinherron added this to the 1.1.5 milestone Jul 2, 2026
@kevinherron kevinherron merged commit 30fef2e into eclipse-milo:main Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant