[YANGTOOLS-127] yang-data-api: ClassCastException when serializing enums Created: 02/Apr/14 Updated: 10/Apr/22 Resolved: 08/Apr/14 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Tomas Olvecky | Assignee: | Ladislav Borak |
| Resolution: | Duplicate | 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: | 646 | ||||||||
| Description |
|
I am testing minimal toaster distro found here: Steps to reproduce: 2014-04-02 08:56:44.325 CEST [qtp1112930044-117] ERROR o.o.c.sal.restconf.impl.RestCodec - ClassCastException was thrown when codec is invoked with parameter Up This is probably related to the fact that org.opendaylight.yangtools.yang.data.api.codec.EnumCodec#serialize has String parameter and ToasterStatus is an enum? Deserialization also looks suspicious IMO |
| Comments |
| Comment by Ladislav Borak [ 07/Apr/14 ] |
|
I tried to reproduce this bug using: https://git.opendaylight.org/gerrit/#/c/5825/ and curl http://localhost:8080/restconf/operational/toaster:toaster/ -v and response was: GET /restconf/operational/toaster:toaster/ HTTP/1.1 HTTP/1.1 200 OK { } It seems to be, it works correctly. |
| Comment by Ladislav Borak [ 07/Apr/14 ] |
|
Propsed patch: |