mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
bug 3442: fixing NPE when checking if marks are used in other course; if there is no course defined yet, marks are not used
Change-Id: Ib4d8e8731dce0e84c819eb42fd29765b4e21850d
This commit is contained in:
1 parent
74b4130338
commit
7f0b8a06d0
2 files changed
+10
-7
No files matched your search
+1
-1
@@ -141,7 +141,7 @@ public class RaceLogCourseManagementWidget extends CourseManagementWidget {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
errorReporter.reportError("Could not load course: " + caught.getMessage());
|
||||
errorReporter.reportError("Could not load course: " + caught.getMessage(), /* silent */ true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+9
-6
@@ -5996,12 +5996,15 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
if (raceLog != raceLogToIgnore) {
|
||||
LastPublishedCourseDesignFinder finder = new LastPublishedCourseDesignFinder(raceLog);
|
||||
CourseBase course = finder.analyze();
|
||||
for (Waypoint waypoint: course.getWaypoints()) {
|
||||
for (Mark mark : waypoint.getMarks()) {
|
||||
if (markIds.contains(mark.getId().toString())) {
|
||||
racesContainingMarksToDeleteInCourse.add(raceColumn.getName()+"/"+fleet.getName());
|
||||
marksAreUsedInOtherRaceLogs = true;
|
||||
}
|
||||
if (course != null) {
|
||||
for (Waypoint waypoint : course.getWaypoints()) {
|
||||
for (Mark mark : waypoint.getMarks()) {
|
||||
if (markIds.contains(mark.getId().toString())) {
|
||||
racesContainingMarksToDeleteInCourse.add(raceColumn.getName() + "/"
|
||||
+ fleet.getName());
|
||||
marksAreUsedInOtherRaceLogs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user