|
UnionStringCodec does the wrong thing when it encounters a type which is not handled by TypeDefinitionAwareCodec: it falls back to invoking toString() on the value. The types not handled are: identityref, instance-identifier and leafref. One example of how this can go wrong is YANGTOOLS-1108. Let's just remove the codepath and start flushing out any offenders out there.
To achieve this, we will take two steps:
- we will remove the toString() fallback and perform an eager codec construction to see if we can handle the type at all. If we cannot, we will return null
- we will remove UnionStringCodec and always return it as unhandled
In this issue we will do the first item and introduce a system property to turn the behaviour to the second item.
|