fix for bug 4020, carrying hullBeam through BoatClassDTO which is now always defaulted to a non-null Distance

This commit is contained in:
Axel Uhl committed 2017-01-08 21:14:01 +01:00
1 parent fbe4f124ee
commit e96d0d5123
11 files changed
+39 -33

No files matched your search

@@ -48,7 +48,9 @@ public class BoatClassImpl extends NamedImpl implements BoatClass {
public BoatClassImpl(String name, boolean typicallyStartsUpwind) {
this(name, typicallyStartsUpwind, /* displayName */ null,
/* hull length */ new MeterDistance(5), /* hullBeam */ null, /* hullType */ null);
// use the typical dinghy parameters as default
/* hull length */ new MeterDistance(5), /* hullBeam */ new MeterDistance(1.8),
/* hullType */ BoatHullType.MONOHULL);
}
public BoatClassImpl(String name, BoatClassMasterdata masterData) {
@@ -250,7 +250,8 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
c.getFlagImage() == null ? null : c.getFlagImage().toString(),
new BoatDTO(c.getBoat().getName(), c.getBoat().getSailID(), c.getBoat().getColor()),
new BoatClassDTO(c.getBoat().getBoatClass()
.getName(), c.getBoat().getBoatClass().getDisplayName(), c.getBoat().getBoatClass().getHullLength()),
.getName(), c.getBoat().getBoatClass().getDisplayName(), c.getBoat().getBoatClass().getHullLength(),
c.getBoat().getBoatClass().getHullBeam()),
c.getTimeOnTimeFactor(), c.getTimeOnDistanceAllowancePerNauticalMile(), c.getSearchTag());
weakCompetitorDTOCache.put(c, competitorDTO);
}