[MDSAL-181] Java binding v1: IAE from provideTypeForLeafref(TypeProviderImpl.java:510) Created: 30/Jun/16 Updated: 09/Mar/18 Resolved: 25/Nov/16 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vratko Polak | Assignee: | Martin Ciglan |
| 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: | 6135 | ||||||||
| Description |
|
When an enumeration is typedeffed and then used in leaf, leafref does not find it creating IllegalArgumentException instead. Example Yang model: https://git.opendaylight.org/gerrit/41142 The stacktrace: [ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator ) [org.opendaylight.yangtools.sal.binding.yang.types.TypeProviderImpl@5489b1f7] |
| Comments |
| Comment by Vratko Polak [ 01/Jul/16 ] |
|
> Example Yang model: https://git.opendaylight.org/gerrit/41142 Only patch set #1, as I forgot to remove old ChangeId when submitting different model. |
| Comment by Filip Gregor [ 25/Oct/16 ] |
|
proposed solution https://git.opendaylight.org/gerrit/#/c/47485/ |
| Comment by Robert Varga [ 28/Oct/16 ] |
| Comment by Robert Varga [ 28/Oct/16 ] |
|
The fix has been reverted, as it breaks bgpcep in rsvp.yang. There is a top-level lsp-flag typedef, which is used in grouping in a leaf, with mandatory=true. That causes: 11:25:52 [ERROR] /w/workspace/bgpcep-merge-carbon/rsvp/impl/src/main/java/org/opendaylight/protocol/rsvp/parser/impl/te/ProtectionCommonParser.java:[77,40] incompatible types: org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspFlag cannot be converted to org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.protection.subobject.ProtectionSubobject.LspFlag e.g. a new type is instantiated instead of reusing the old one. This smells like a failure to check between RestrictedType and its parent... |
| Comment by Martin Ciglan [ 02/Nov/16 ] |
|
looking into it |
| Comment by Martin Ciglan [ 25/Nov/16 ] |
|
fix pushed: |
| Comment by Robert Varga [ 25/Nov/16 ] |