[YANGTOOLS-599] Yangtools produces non-compilable code when enum type has "=" sign Created: 05/Apr/16  Updated: 10/Apr/22  Resolved: 06/Apr/16

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

Type: Bug
Reporter: Ryan Goulding Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Duplicate
duplicates MDSAL-52 Binding Java API Generator -> doesn't... Resolved
External issue ID: 5672

 Description   

This was noticed in Lithium-based yangtools.

For example:
enum "L-CSR-10M-APP-3Y=";

This will produce something like:

public enum VnfModel {
LCSR10MAPP3Y=(7),

Which java will obviously bark at (since it contains an equal sign. I know that RFC6020 suggests against using Unicode control codes, but "=" is not one so should be a valid character. A solution may be to replace "=" with a sentinel value in the compiled code?



 Comments   
Comment by Ryan Goulding [ 05/Apr/16 ]

https://git.opendaylight.org/gerrit/37157

Comment by Robert Varga [ 06/Apr/16 ]

This is a duplicate of BUG-2332.

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