Skip to content

Commit

Permalink
Add null checks in GPXTrackAnalysisUpdatesTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Sep 26, 2024
1 parent ff5b7f9 commit 8b20df1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ public boolean isCancelled() {

@Override
public void onGpxDataItemReady(@NotNull GpxDataItem item) {
if (analysis != item.getAnalysis()) {
throw new AssertionError("To many updates of analysis ");
GpxTrackAnalysis trackAnalysis = item.getAnalysis();
if (analysis != null && trackAnalysis != null && analysis != trackAnalysis) {
throw new AssertionError("To many updates of analysis");
}
}
});
Expand Down

0 comments on commit 8b20df1

Please sign in to comment.