Github user dlaboss commented on a diff in the pull request:
https://github.com/apache/incubator-quarks/pull/7#discussion_r56052094
--- Diff: apps/iot/src/test/java/quarks/test/apps/iot/EchoIotDevice.java ---
@@ -78,7 +78,7 @@ private static String getCommandIdFromEvent(String
eventId, JsonObject evPayload
if (evPayload.has(EVENT_CMD_ID))
return
evPayload.getAsJsonPrimitive(EVENT_CMD_ID).getAsString();
else
- return "ec_" + eventId;
+ return eventId;
}
--- End diff --
this applies to `commands()` on line 110...
- in the case where there's no cmd filtering, why is it desirable/necessary
to pass `echoCmds` through a `alwaysTrue` filter? Why not just return
`echoCmds`?
- can't multi-cmd case processing be simplified to only have a single
`filter` and no `union`... and merged with the single cmd filtering case for
that matter? e.g.,
```
Set<String> cmds = new HashSet<>(Arrays.asList(commands));
return echoCmds.filter(j ->
cmds.contains(j.getAsJsonPrimitive(CMD_ID).getAsString());
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---