fixed OpenEndedDeviceMappingFinder to let it find mappings to marks, too

Change-Id: I29cc05a66b0bf768b311d8652e7bf88796654091
This commit is contained in:
Axel Uhl committed 2016-06-24 18:53:55 +02:00
1 parent fc6be86f7f
commit 941d50416d
2 files changed
+5 -4

No files matched your search

@@ -7,6 +7,7 @@ import com.sap.sailing.domain.abstractlog.regatta.RegattaLog;
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEvent;
import com.sap.sailing.domain.abstractlog.regatta.RegattaLogEventVisitor;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceCompetitorMappingEvent;
import com.sap.sailing.domain.abstractlog.regatta.events.RegattaLogDeviceMappingEvent;
import com.sap.sse.common.WithID;
@@ -29,8 +30,8 @@ public class OpenEndedDeviceMappingFinder extends BaseLogAnalyzer<RegattaLog, Re
@Override
protected Serializable performAnalysis() {
for (RegattaLogEvent regattaLogEvent : log.getUnrevokedEvents()) {
if (regattaLogEvent instanceof RegattaLogDeviceCompetitorMappingEvent) {
RegattaLogDeviceCompetitorMappingEvent deviceMappingEvent = (RegattaLogDeviceCompetitorMappingEvent) regattaLogEvent;
if (regattaLogEvent instanceof RegattaLogDeviceMappingEvent<?>) {
RegattaLogDeviceMappingEvent<?> deviceMappingEvent = (RegattaLogDeviceMappingEvent<?>) regattaLogEvent;
if (deviceMappingEvent.getMappedTo().equals(mappedTo) &&
deviceMappingEvent.getDevice().getStringRepresentation().equals(deviceUuid)) {
return deviceMappingEvent.getId();