Skip to content

Commit 92b5e31

Browse files
committed
Fixed null reference error handling category context activities
1 parent 0cca01c commit 92b5e31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/rusticisoftware/tincan/ContextActivities.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ public ContextActivities(JsonNode jsonNode) throws URISyntaxException {
9393
this.category = new ArrayList<Activity>();
9494

9595
if (categoryNode.isArray()) {
96-
for (JsonNode element : otherNode) {
96+
for (JsonNode element : categoryNode) {
9797
this.category.add(new Activity(element));
9898
}
9999
}
100100
else {
101-
this.category.add(new Activity(otherNode));
101+
this.category.add(new Activity(categoryNode));
102102
}
103103
}
104104
}
@@ -164,7 +164,7 @@ public ObjectNode toJSONNode(TCAPIVersion version) {
164164
ArrayNode category = mapper.createArrayNode();
165165
node.put("category", category);
166166

167-
for (Activity element : this.getOther()) {
167+
for (Activity element : this.getCategory()) {
168168
category.add(element.toJSONNode(version));
169169
}
170170
}

0 commit comments

Comments
 (0)