Skip to content

Commit

Permalink
Fix NPE in addFeatures and removeFeatures (#2314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Almighty-Satan committed Oct 28, 2022
1 parent 5d13c14 commit 59c7a9c
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -307,14 +307,14 @@ public GuildManager setFeatures(@Nonnull Collection<String> features)
@Override
public GuildManager addFeatures(@Nonnull Collection<String> features)
{
return updateFeatures(features, this.features::add);
return updateFeatures(features, feature -> this.features.add(feature));
}

@Nonnull
@Override
public GuildManager removeFeatures(@Nonnull Collection<String> features)
{
return updateFeatures(features, this.features::remove);
return updateFeatures(features, feature -> this.features.remove(feature));
}

private GuildManager updateFeatures(Collection<String> changed, Consumer<String> op)
Expand Down

0 comments on commit 59c7a9c

Please sign in to comment.