Skip to content

Commit

Permalink
remove predict assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
bengreenbank committed Feb 13, 2023
1 parent b4d4849 commit ae39a7f
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,6 @@ public String toEnumVarName(String value, String datatype) {
return super.toEnumVarName(value, datatype);
}

// predict has some enums that are operators, we internally convert them to prevent wrong
// assumptions from the generator/templates.
switch (value) {
case "<":
return "LT";
case ">":
return "GT";
case "=":
return "EQ";
case "<=":
return "LTE";
case ">=":
return "GTE";
case "!=":
return "NEQ";
}

if (!value.matches("[A-Z0-9_]+")) {
// convert camelCase77String to CAMEL_CASE_77_STRING
return value.replaceAll("-", "_").replaceAll("(.+?)([A-Z]|[0-9])", "$1_$2").toUpperCase(Locale.ROOT);
Expand Down

0 comments on commit ae39a7f

Please sign in to comment.