Technical debt: ENUM_32_BITS #3874

This commit is contained in:
rusefillc 2022-05-01 23:52:29 -04:00
parent 061917f7ab
commit d4323d370a
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@ -49,7 +49,9 @@ public class ToJavaEnum {
int index = 0;
for (Value value : sorted) {
int numericValue = value.getIntValueMaybeResolve(registry);
if (index != numericValue && !value.getName().startsWith("Force_4_bytes_size"))
if (index != numericValue
&& !value.getName().startsWith("Force_2_bytes_size")
&& !value.getName().startsWith("Force_4_bytes_size"))
throw new IllegalStateException("Got explicit ordinal " + numericValue + " instead of ordinal " + index + " in " + value);
sb.append("\t" + value.getName() + ",\n");
index++;