Skip to content

Commit

Permalink
Revert Objects.requireNonNullElse call for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarasyad committed Dec 18, 2023
1 parent f2fe75a commit 44081da
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ public DifficultyControlPoint getDifficultyPointAt(double time) {
return defaultDifficultyPoint;
}
DifficultyControlPoint difficultyControlPoint = binarySearch(difficultyPoints, time, defaultDifficultyPoint);
return Objects.requireNonNullElse(difficultyControlPoint, defaultDifficultyPoint);
if (difficultyControlPoint == null) {
return defaultDifficultyPoint;
}

return difficultyControlPoint;
}

private <T extends ControlPoint> T binarySearch(List<T> list, double time, T prePoint) {
Expand Down

0 comments on commit 44081da

Please sign in to comment.