Merge branch 'master' into bug2822_boatcolors

This commit is contained in:
Axel Uhl committed 2015-11-14 17:05:55 +01:00
commit 7fd8016aaf
3 files changed
+14 -7

No files matched your search

@@ -157,7 +157,7 @@ public class RaceColumnDTO extends NamedDTO implements Serializable {
public boolean isLive(FleetDTO fleet, long serverTimePointAsMillis) {
boolean result = false;
final RaceDTO raceDTO = racesPerFleet.get(fleet);
if(raceDTO != null) {
if (raceDTO != null) {
result = raceDTO.isLive(serverTimePointAsMillis);
}
return result;
@@ -169,7 +169,7 @@ public class RaceColumnDTO extends NamedDTO implements Serializable {
public boolean hasLiveRaces(long serverTimePointAsMillis) {
boolean result = false;
for(FleetDTO fleet: fleets) {
for (FleetDTO fleet: fleets) {
result |= isLive(fleet, serverTimePointAsMillis);
}
return result;
@@ -29,6 +29,7 @@ import com.sap.sailing.domain.abstractlog.impl.AllEventsOfTypeFinder;
import com.sap.sailing.domain.abstractlog.impl.LastEventOfTypeFinder;
import com.sap.sailing.domain.abstractlog.race.RaceLog;
import com.sap.sailing.domain.abstractlog.race.RaceLogEvent;
import com.sap.sailing.domain.abstractlog.race.RaceLogEventVisitor;
import com.sap.sailing.domain.abstractlog.race.analyzing.impl.LastPublishedCourseDesignFinder;
import com.sap.sailing.domain.abstractlog.race.impl.RaceLogCourseDesignChangedEventImpl;
import com.sap.sailing.domain.abstractlog.race.tracking.RaceLogDefineMarkEvent;
@@ -42,6 +43,8 @@ import com.sap.sailing.domain.abstractlog.race.tracking.impl.RaceLogDeviceMarkMa
import com.sap.sailing.domain.abstractlog.race.tracking.impl.RaceLogRegisterCompetitorEventImpl;
import com.sap.sailing.domain.abstractlog.race.tracking.impl.RaceLogStartTrackingEventImpl;
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.impl.RegattaLogDeviceMarkMappingEventImpl;
import com.sap.sailing.domain.abstractlog.regatta.events.impl.RegattaLogRegisterCompetitorEventImpl;
import com.sap.sailing.domain.abstractlog.shared.analyzing.RegisteredCompetitorsAnalyzer;
@@ -275,21 +278,25 @@ public class RaceLogTrackingAdapterImpl implements RaceLogTrackingAdapter {
@Override
public void pingMark(RaceLog raceLog, Mark mark, GPSFix gpsFix, RacingEventService service) {
DeviceMarkMappingEventFactory<RaceLogEventVisitor, RaceLogEvent> raceLogEventFactory =
(DeviceIdentifier dev, TimePoint timePoint) -> new RaceLogDeviceMarkMappingEventImpl(timePoint, service
.getServerAuthor(), raceLog.getCurrentPassId(), mark, dev, timePoint, timePoint);
pingMark(
raceLog,
mark,
gpsFix,
service,
(DeviceIdentifier dev, TimePoint timePoint) -> new RaceLogDeviceMarkMappingEventImpl(timePoint, service
.getServerAuthor(), raceLog.getCurrentPassId(), mark, dev, timePoint, timePoint),
raceLogEventFactory,
new PingDeviceIdentifierImpl());
}
@Override
public void pingMark(RegattaLog regattaLog, Mark mark, GPSFix gpsFix, RacingEventService service) {
pingMark(regattaLog, mark, gpsFix, service,
DeviceMarkMappingEventFactory<RegattaLogEventVisitor, RegattaLogEvent> regattaLogEventFactory =
(DeviceIdentifier dev, TimePoint timePoint) -> new RegattaLogDeviceMarkMappingEventImpl(timePoint,
timePoint, service.getServerAuthor(), UUID.randomUUID(), mark, dev, timePoint, timePoint),
timePoint, service.getServerAuthor(), UUID.randomUUID(), mark, dev, timePoint, timePoint);
pingMark(regattaLog, mark, gpsFix, service,
regattaLogEventFactory,
new PingDeviceIdentifierImpl());
}
@@ -12,7 +12,7 @@ public class GetDominantObjectTest {
@Test
public void testNullCollection() {
Assert.assertArrayEquals(null, Util.getDominantObject(null));
Assert.assertNull(Util.getDominantObject(null));
}
@Test