[MDSAL-47] Incorrect type transformation in TypeProviderImpl.javaTypeForSchemaDefinitionType Created: 14/Sep/14  Updated: 15/Jul/21  Resolved: 02/May/16

Status: Resolved
Project: mdsal
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Lukas Sedlak Assignee: Filip Gregor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


Attachments: Text File karaf.log    
External issue ID: 1862

 Description   

Incorrect Type transformation from yang typedef to GeneratedTransferObject when base type of yang typedef is integer or decimal type or derived from and the typedef is used in leaf with additional range constraint restriction.

Yang model:

module typedefs {
  typedef yang-int8 {
    type int8;
  }
}

module buggy-typedef-use {
  import typedefs { prefix tp; }

  leaf used-type {
    type tp:yang-int8;
  }

  leaf restricted-type {
    type tp:yang-int8 {
      range 1..100;
    }
  }
}

 

Transformation of leaf "used-type" results into GeneratedTransferObject implementation since it is transformation of typedef statement to Yang Java Type. Transformation of "restricted-type" leaf results into "Concrete Type" without additional range restriction check which is invalid since it should be transformed as GeneratedTransferObject



 Comments   
Comment by RichardHill [ 27/Oct/14 ]

Attachment karaf.log has been added with description: karaf log from 27th October snapshot

Comment by Robert Varga [ 18/Sep/15 ]

Moved to the MD-SAL project

Comment by Robert Varga [ 18/Sep/15 ]

Re-enabled test case: https://git.opendaylight.org/gerrit/27165

Comment by Filip Gregor [ 19/Feb/16 ]

suggested workaround https://git.opendaylight.org/gerrit/#/c/27165/

Comment by Robert Varga [ 02/May/16 ]

Be: https://git.opendaylight.org/gerrit/#/c/38258/

Generated at Wed Feb 07 20:08:30 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.