Skip to content

Commit

Permalink
Fix error reading from the wrong object
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenLooman committed Aug 31, 2023
1 parent 8c66ac8 commit 62edad4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,11 @@ private void handleType(final JSONObject instruction) {
instruction.getJSONArray(InstType.GENERICS.getValue()).forEach(genericObj -> {
final JSONObject generic = (JSONObject) genericObj;
final String genericName = generic.getString(InstType.GENERIC_NAME.getValue());
final String genericDoc = generic.getString(InstType.GENERIC_DOC.getValue());
final GenericDeclaration genericDeclaration = type.addGeneric(null, genericName);
genericDeclaration.setDoc(genericDoc);
if (generic.get(InstType.GENERIC_DOC.getValue()) != JSONObject.NULL) {
final String genericDoc = generic.getString(InstType.GENERIC_DOC.getValue());
genericDeclaration.setDoc(genericDoc);
}
});

final JSONArray parents = instruction.getJSONArray(InstType.PARENTS.getValue());
Expand Down

0 comments on commit 62edad4

Please sign in to comment.