avoid NPE regarding unset last-correction time point on leaderboard score correction

This commit is contained in:
Axel Uhl committed 2012-07-21 00:33:58 +02:00
1 parent eda47448c1
commit 2fcfee479f
1 file changed
+1 -1
@@ -419,7 +419,7 @@ public class SailingServiceImpl extends RemoteServiceServlet implements SailingS
LeaderboardDTO result = null;
final Leaderboard leaderboard = getService().getLeaderboardByName(leaderboardName);
if (leaderboard != null) {
result = new LeaderboardDTO(leaderboard.getScoreCorrection()==null ?
result = new LeaderboardDTO(leaderboard.getScoreCorrection().getTimePointOfLastCorrectionsValidity()==null ?
null : leaderboard.getScoreCorrection().getTimePointOfLastCorrectionsValidity().asDate(),
leaderboard.getScoreCorrection()==null?null:leaderboard.getScoreCorrection().getComment());
final TimePoint timePoint = new MillisecondsTimePoint(date);