bug5525: fixed NPEs in MediaTrack and missing refresher update when creating default leaderboard groups in create event workflow.

This commit is contained in:
Udo Wessels
2021-04-25 17:09:11 +02:00
parent 436920300f
commit 91bcc0cbd5
2 changed files with 4 additions and 16 deletions
@@ -143,25 +143,11 @@ public class MediaTrack implements Serializable, WithQualifiedObjectIdentifier {
}
public boolean beginsAfter(Date date) {
if (date == null) {
return false;
} else if (startTime.asDate().after(date)) {
return true;
} else {
return false;
}
return startTime != null && date != null && startTime.asDate().after(date);
}
public boolean endsBefore(Date date) {
if (date == null) {
return false;
} else if (duration == null) {
return false; //null-duration implies open-ended!
} else if (deriveEndTime().asDate().before(date)) {
return true;
} else {
return false;
}
return date != null && deriveEndTime() != null && deriveEndTime().asDate().before(date);
}
@Override
@@ -592,6 +592,8 @@ public class EventListComposite extends Composite {
} else {
errorReporter.reportError("Could not find the event with name "+newEvent.getName()+" to which the leaderboardgroup should be added");
}
presenter.getLeaderboardGroupsRefresher().add(newGroup);
presenter.getLeaderboardGroupsRefresher().callAllFill();
openCreateDefaultRegattaDialog(newEvent);
}
}));