[MDSAL-348] enumerated type with enum value 'optional' is not compilable Created: 07/Jun/18 Updated: 08/Jun/18 Resolved: 08/Jun/18 |
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | Fluorine |
| Fix Version/s: | Fluorine |
| Type: | Bug | Priority: | Medium |
| Reporter: | Richard Kosegi | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Source are generated using yang-maven-plugin:2.0.5:generate-sources MOJO using default configuration inherited from <parent>
|
||
| Description |
|
This snippet is not compilable:
typedef tls-client-verify {
type enumeration {
enum require {
}
enum optional {
}
enum none {
}
}
}
With error
[ERROR] some/path/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/jsonrpc/authsec/rev180607/TlsClientVerify.java:[74,24] cannot find symbol Because of generated code:
Required(0, "required"), Optional(1, "optional"), None(2, "none") ;
public static Optional<TlsClientVerify> forName(String name) { return Optional.ofNullable(NAME_MAP.get(Objects.requireNonNull(name))); }
Optional is referring to both enum value and java.util.Optional class.
|
| Comments |
| Comment by Robert Varga [ 07/Jun/18 ] |
|
Missing version... |
| Comment by Richard Kosegi [ 07/Jun/18 ] |
|
My bad, updated environment info |