Skip to content

Commit

Permalink
StructsGenerator: Fix bug where an empty field declaration would be c…
Browse files Browse the repository at this point in the history
…reated if only skipped fields are declared in a struct.
  • Loading branch information
calin-iorgulescu committed Oct 17, 2018
1 parent 235f0b9 commit 2b88a8f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ void generateFIDsStructure(JNIClass clazz) {
outputln("_FID_CACHE {");
outputln("\tint cached;");
outputln("\tjclass clazz;");
output("\tjfieldID ");
List<JNIField> fields = clazz.getDeclaredFields();
boolean first = true;
for (JNIField field : fields) {
if (ignoreField(field))
continue;
if (!first)
if (first)
output("\tjfieldID ");
else
output(", ");
output(field.getName());
first = false;
Expand Down

0 comments on commit 2b88a8f

Please sign in to comment.