[YANGTOOLS-118] enumeration type in key of list error Created: 25/Mar/14  Updated: 10/Apr/22  Resolved: 08/Apr/14

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

Type: Bug
Reporter: Martin Sunal Assignee: Martin Vitez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: PC


Issue Links:
Blocks
blocks YANGTOOLS-108 Milestone : Bugfixing for Helium Resolved
External issue ID: 586

 Description   

Generation of java code from this yang works:

typedef permission-type {
type enumeration

{ enum permit; enum deny; }

}

container access-control-services {
list access-control-service {
key "permission";

leaf permission

{ type permission-type; }

}
}

-------------------------------------------------------------
but generation from this has error

container access-control-services {
list access-control-service {
key "permission";

leaf permission {
type enumeration

{ enum permit; enum deny; }

}
}
}

[ERROR] /PathToGeneratedClass/AccessControlServiceBuilder.java:[75,54] incompatible types
required: packageName.AccessControlService.Permission
found: java.lang.Enum



 Comments   
Comment by Martin Vitez [ 02/Apr/14 ]

Proposed patch:

https://git.opendaylight.org/gerrit/#/c/5803/

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