removed redundant null check

Change-Id: Ifd325b8fc86c0de969c2d03812c633af9add1b86
This commit is contained in:
Axel Uhl committed 2018-04-19 20:50:28 +02:00
1 parent 18c777a99f
commit aa8d6ea8a2
1 file changed
+2 -3
@@ -1652,9 +1652,8 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
result = null; // the competitor wasn't found
dbObjectForUpdate = Optional.empty();
} else if (boatId == null) {
final Boat boat;
if (competitor.hasBoat() && (boat=((CompetitorWithBoat) competitor).getBoat()) != null) {
result = new RaceLogRegisterCompetitorEventImpl(createdAt, logicalTimePoint, author, id, passId, competitor, boat);
if (competitor.hasBoat()) {
result = new RaceLogRegisterCompetitorEventImpl(createdAt, logicalTimePoint, author, id, passId, competitor, ((CompetitorWithBoat) competitor).getBoat());
} else {
logger.warning("Bug2822: Competitor with ID "+competitorId+" already seems to have been migrated to one without boat."+
" But the RaceLogRegisterCompetitorEventImpl event loaded does not specify one either. We'll try to find a boat...");