Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
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.
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.