[YANGTOOLS-780] decimal64 fraction digits sub statement Created: 31/May/17 Updated: 10/Apr/22 Resolved: 27/Jul/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Dhruv Bhardwaj | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 8573 |
| Description |
|
Hi, For data type with following yang schema: typedef pm-data-type { type decimal64 { fraction-digits 17; } } ODL is thowing the following error: java.lang.IllegalArgumentException: Invalid data "-99.9" for union type. can you please help. |
| Comments |
| Comment by Peter Kajsa [ 01/Jun/17 ] |
|
Hi, the value '-99.9' does not match any of specified fraction-digits in the union type, so therefore the error occurs. For more details about fraction digits please see https://tools.ietf.org/html/rfc7950#section-9.3.4 BR. |
| Comment by Peter Kajsa [ 01/Jun/17 ] |
|
Based on the discussion in yang-dev mailing list I reopened the bug.. |
| Comment by Robert Varga [ 01/Jun/17 ] |
|
Hello Dhruv, can you enable logging on org.opendaylight.yangtools.yang.data.util.AbstractStringUnionCodec, please? it should allow us to understand what went down in the sub-codec, i.e. there should be messages matching: LOG.debug("Data {} did not match for {}", data, type, e); which would pinpoint the source of the trouble. |
| Comment by Robert Varga [ 01/Jun/17 ] |
|
Also, what version of ODL have you seen this? |
| Comment by Dhruv Bhardwaj [ 01/Jun/17 ] |
|
I used carbon. Thanks |
| Comment by Robert Varga [ 27/Jul/18 ] |
|
No feedback, hence closing as cannot reproduce. If this issue crops up, feel free to reopen. |