Closed liangde-chen closed 4 years ago
Sorry, but this problem addressed not to kaitai-gradle-plugin
/kaitai-maven-plugin
, because this plugins simply use https://github.com/kaitai-io/kaitai_struct_compiler to convert *.ksy
files into *.java
files and then compiles them.
This problem is in JavaCompiler::enumDeclaration: enums consist of id
of type Long
and label
of type String
.
Generated enum class has constructor with argument of type long
, but value 4294967295
on compile time interpreted as int
and this value is out of integer range.
P.S. I created https://github.com/kaitai-io/kaitai_struct_compiler/pull/186 with fix.
@liangde-chen PR into kaitai_struct_compiler
was merged.
You need to wait for new release of kaitai_struct_compiler
.
I have some kaitai file like this:
And the generated java code failed to be compiled:
NOT_FOUND(4294967295);
Error: integer number too large.