mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-16 07:10:48 +00:00
avoid npes due to boat-class with nulled display-name;
This commit is contained in:
1 parent
2522380e18
commit
5d839742be
1 file changed
+2
-2
+2
-2
@@ -833,9 +833,9 @@ public class PolarDiagramBase implements PolarDiagram, Serializable {
|
||||
public long getTurnLoss() {
|
||||
// TODO: retrieve values from polar data mining
|
||||
int turnLoss;
|
||||
if (this.boatClass.getDisplayName().equals(BoatClassMasterdata.EXTREME_40.getDisplayName())) {
|
||||
if ((this.boatClass.getDisplayName() != null) && (this.boatClass.getDisplayName().equals(BoatClassMasterdata.EXTREME_40.getDisplayName()))) {
|
||||
turnLoss = 2000;
|
||||
} else if (this.boatClass.getDisplayName().equals(BoatClassMasterdata._5O5.getDisplayName())) {
|
||||
} else if ((this.boatClass.getDisplayName() != null) && (this.boatClass.getDisplayName().equals(BoatClassMasterdata._5O5.getDisplayName()))) {
|
||||
turnLoss = 5000;
|
||||
} else {
|
||||
turnLoss = 4000; // default value
|
||||
|
||||
Reference in new issue
Block a user