We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1dfe13a + d39e7d7 commit eca9801Copy full SHA for eca9801
src/main/java/com/rusticisoftware/tincan/ContextActivities.java
@@ -160,13 +160,15 @@ public ObjectNode toJSONNode(TCAPIVersion version) {
160
}
161
162
if (this.category != null && this.category.size() > 0) {
163
- if (version.ordinal() <= TCAPIVersion.V100.ordinal()) {
+ if (version.ordinal() >= TCAPIVersion.V100.ordinal()) {
164
ArrayNode category = mapper.createArrayNode();
165
node.put("category", category);
166
167
for (Activity element : this.getCategory()) {
168
category.add(element.toJSONNode(version));
169
170
+ } else {
171
+ throw new IncompatibleTCAPIVersion("Version " + version.toString() + " doesn't support the category context activity");
172
173
174
0 commit comments