fixed hasBoat problem on PreviousCompetitorDTOImpl

Change-Id: I64b43385ff3fdd663ed47cba22eda9b9d7344294
This commit is contained in:
Axel Uhl committed 2018-04-20 16:14:54 +02:00
1 parent 2ec7112b35
commit 06716ab2ac
2 files changed
+7 -1

No files matched your search

@@ -170,4 +170,10 @@ public class PreviousCompetitorDTOImpl implements CompetitorWithBoatDTO {
public CompetitorWithBoatDTO getCompetitorFromPrevious(LeaderboardDTO previousVersion) {
return previousVersion.competitors.get(indexInPreviousCompetitorList);
}
@Override
public boolean hasBoat() {
throw new RuntimeException("Internal error. Objects of type "+PreviousCompetitorDTOImpl.class.getName()+
" need to be replaced by an object of "+CompetitorWithBoatDTOImpl.class.getName()+" after deserialization");
}
}
@@ -67,7 +67,7 @@ public class CompetitorToBoatMappingsViewPanel extends SimplePanel {
HorizontalPanel buttonPanel = new HorizontalPanel();
buttonPanel.setSpacing(5);
mainPanel.add(buttonPanel);
Grid grid = new Grid(1,2);
Grid grid = new Grid(1, 2);
grid.setWidget(0, 0, competitorsPanel);
grid.setWidget(0, 1, boatsPanel);
grid.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);