Skip to content

Commit

Permalink
Add sanity check. Default to risk = 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Jan 2, 2025
1 parent f5db199 commit d85c572
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ public RiskModelSampleWildcard(DataHandleInternal handle,
throw new IllegalArgumentException("Wildcard must not be null");
}

// Sanity check
if (identifiers.isEmpty()) {
this.recordsAtRisk = 0d;
this.highestRisk = 0d;
this.lowestRisk = 0d;
this.averageRisk = 0d;
return;
}

// Calculate groups
Groupify<TupleWrapper> groups = getGroups(handle, identifiers, 0d, 0.3d, stop, progress);

Expand Down

0 comments on commit d85c572

Please sign in to comment.