[YANGTOOLS-155] Union Codec serialize throws Class cast when the union object is passed Created: 07/May/14 Updated: 10/Apr/22 Resolved: 28/May/14 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Kamal Rameshan | Assignee: | Kamal Rameshan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| Issue Links: |
|
||||||||
| External issue ID: | 973 | ||||||||
| Priority: | Normal | ||||||||
| Description |
|
I have a union type in my yang schema leaf port-number { } through which it creates a PortNumber object. But the Union codec UnionCodecStringImpl.serialize accepts a String and not the union object PortNumber. The serialize() should be able to look for the types within the UnionTypeDefinition and return back the non-null value of the union. Following is the error i am getting: |
| Comments |
| Comment by Kamal Rameshan [ 07/May/14 ] |
|
https://git.opendaylight.org/gerrit/#/c/6799/ submitted for review |
| Comment by Tom Pantelis [ 19/May/14 ] |
|
This bug is similar to |