[MDSAL-214] Instance identifier can't be used in union Created: 22/Dec/16 Updated: 09/Mar/18 Resolved: 12/Jan/17 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Richard Kosegi | Assignee: | Vratko Polak |
| 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: | 7425 |
| Description |
|
Following YANG is not compilable by yangtools: module demo { typedef some-type { } Yangtools generated source code requires union members to have method "String getValue()", which is not case of built-in type InstanceIdentifier. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project test-model: Compilation failure This is generated code (SomeType.java): 60 public char[] getValue() { else 68 } |
| Comments |
| Comment by Peter Kajsa [ 22/Dec/16 ] |
|
It is a binding generator issue, hence moved to md-sal. |
| Comment by Vratko Polak [ 04/Jan/17 ] |
|
I lack the skill to make a proper unit test, and I am not sure the following is allowed from architecture point of view, but anyway: A failing change showing this Bug is real: https://git.opendaylight.org/gerrit/50017 (Verify jobs are still in queue. I hope I did not make any mistake when building locally.) |
| Comment by Vratko Polak [ 04/Jan/17 ] |
|
> I hope I did not make any mistake Looks like no mistake, verification results are as expected. |
| Comment by Vratko Polak [ 05/Jan/17 ] |
|
> A simple workaround ... got -1. Better fix: https://git.opendaylight.org/gerrit/50070 |
| Comment by Robert Varga [ 06/Jan/17 ] |
| Comment by Martin Ciglan [ 12/Jan/17 ] |
|
fix for binding spec v2, carbon: |