View Issue Details

IDProjectCategoryView StatusLast Update
001050510000-006: MappingsSpecpublic2025-10-07 16:31
ReporterThilo Bellinger Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Product Version1.05.04 
Summary0010505: Confusing or wrong default value and questionable is nullable for type ExtensionObject
Description

Part 6 Chapter 5.1.2 Built-in Types
Table 1
For the default value of ExtensionObject It describes "All fields set to default".

This description is incomplete or confusing as an ExtensionObject consists of a type identifier (EncodingId or TypeId) and a Body.
The sentece "All fields set to default" makes sense for the body portion for a known type, but there is no useful default value for the identifier.
In theory one could use a Null-NodeId as a default for the identifier but that seems to have no valid use-case.

I recommend to distinguish in the specification about the body portion and the entire ExtensionObject to make it more clear.
I also recommend that a full ExtensionObject cannot be Null and has no default value, only the body portion.

Example where we detected this confusion:
On JSON or XML encoding, all fields with default values can be omitted, thus detecting a missing field on a decoder means to generate a default value.
For StructuresWithSubtypes (which encode entire ExtensionObjects) it can be impossible to generate a valid default value (e.g. when the allowed base type is abstract).
The correct solution is to not try to generate a default value and report a decoding error because the ExtensionObject identifier was missing or implies the invalid Null-NodeId as identifier.

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-09-17 14:48 Thilo Bellinger New Issue
2025-10-07 16:31 Jim Luth Assigned To => Randy Armstrong
2025-10-07 16:31 Jim Luth Status new => assigned