[YANGTOOLS-758] yang-data-codec-xml: reuse codecs across documents Created: 14/Mar/17 Updated: 10/Apr/22 Resolved: 11/Apr/17 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||||||
| External issue ID: | 7983 | ||||||||||||
| Description |
|
XmlCodecFactory is making the mistake of caching the codecs based on the combination of NamespaceContext and TypeDefinition. This means the codecs cannot be reused across documents, as these result in distinct NamespaceContext. The XmlCodec interface already provides a writer, from which we can get the namespace context, hence it should be relatively easy to pass this down for the duration of the serialization request. |
| Comments |
| Comment by Robert Varga [ 24/Mar/17 ] |
|
|
| Comment by Robert Varga [ 27/Mar/17 ] |
|
tip of master: https://git.opendaylight.org/gerrit/53870 |