Skip to content

Commit

Permalink
0003042: Batch protocol incorrect when reload event with no data is
Browse files Browse the repository at this point in the history
followed by two different change events
  • Loading branch information
chenson42 committed Apr 10, 2017
1 parent fdcf470 commit 2a85742
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -1646,11 +1646,10 @@ public CsvData next() {
if (data == null) {
data = this.cursor.next();
if (data != null) {
TriggerHistory triggerHistory = data.getTriggerHistory();
String routerId = data.getAttribute(CsvData.ATTRIBUTE_ROUTER_ID);

if (data.getDataEventType() == DataEventType.RELOAD) {

TriggerHistory triggerHistory = data.getTriggerHistory();
String triggerId = triggerHistory.getTriggerId();

TriggerRouter triggerRouter = triggerRouterService
Expand All @@ -1677,6 +1676,7 @@ public CsvData next() {
return next();
}
} else {
TriggerHistory triggerHistory = data.getTriggerHistory();
Trigger trigger = triggerRouterService.getTriggerById(
triggerHistory.getTriggerId(), false);
if (trigger != null || triggerHistory.getTriggerId().equals(AbstractFileParsingRouter.TRIGGER_ID_FILE_PARSER)) {
Expand Down Expand Up @@ -1758,8 +1758,10 @@ public CsvData next() {
}
}

lastTriggerHistory = triggerHistory;
lastRouterId = routerId;
if (data != null) {
lastTriggerHistory = data.getTriggerHistory();
lastRouterId = routerId;
}
} else {
closeCursor();
}
Expand Down

0 comments on commit 2a85742

Please sign in to comment.