Skip to content

Commit

Permalink
Add comment on why Integer is used instead of int
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jul 5, 2023
1 parent 7ab4185 commit 2a3e862
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,10 @@ private void saveBlocks(ConfigurationSection phSec, OneBlockPhase phase) {
* @param phase - one block phase
* @return next phase or null if there isn't one
*/
@SuppressWarnings("WrapperTypeMayBePrimitive")
@Nullable
public OneBlockPhase getNextPhase(@NonNull OneBlockPhase phase) {
// These are Integer objects because GSON can yield nulls if they do not exist
Integer blockNum = phase.getBlockNumberValue();
Integer nextKey = blockProbs.ceilingKey(blockNum + 1);
return nextKey != null ? this.getPhase(nextKey) : null;
Expand Down

0 comments on commit 2a3e862

Please sign in to comment.