Skip to content

generated enums  #1919

Closed
Closed
@fehguy

Description

@fehguy

Currently a generated class gives enums like such:

public enum FormatEnum {
  ENUM1("enum 1"),
  ENUM2("enum 2");

  private String value;

  FormatEnum(String value) {
    this.value = value;
  }

  @Override
  public String toString() {
    return value;
  }
}

When constructing a value from the string "enum 1", you will get an error as "enum 1" is compared against the ENUM1 and ENUM2 keys, resulting in an exception.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions