[MDSAL-160] enum used as a key does not work Created: 22/Apr/16 Updated: 09/Mar/18 Resolved: 16/May/16 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Srini Seetharaman | Assignee: | Filip Gregor |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 5788 |
| Description |
|
In my YANG model, I'm using an enum leaf as key. That passes POJO generation, but fails the Java compilation. For instance, if I use the following perfectly valid model, it fails mvn build (when I use Beryllium-SR1 yangtools). module model1 { grouping A { container C { } mvn compilation generates the following error. [INFO] ------------------------------------------------------------- When I look deeper into the code generated, I see that DKey generates with the field of type Enum instead of type B (which is what DBuilder.java is expecting). The only way to get pass this issue is to define the enumeration separately as a typedef. If I do that, things work fine. |
| Comments |
| Comment by Martin Ciglan [ 25/Apr/16 ] |
|
moving to MD-SAL |
| Comment by Filip Gregor [ 26/Apr/16 ] |
|
proposed fix https://git.opendaylight.org/gerrit/#/c/38106/ |
| Comment by Robert Varga [ 16/May/16 ] |