Skip to content

Commit

Permalink
Enforce notnull for accoutn name/uuid fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr committed Dec 21, 2024
1 parent fa24d57 commit 55ae491
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.function.Supplier;
import java.util.logging.Level;
Expand Down Expand Up @@ -58,8 +59,8 @@ public abstract class Account implements Nameable, Identifiable {

public Account(final EconomyHandler owner, final @NotNull String name, final @NotNull UUID uuid, final @Nullable Supplier<TownyWorld> worldSupplier) {
this.economyHandler = owner;
this.name = name;
this.uuid = uuid;
this.name = Objects.requireNonNull(name, "name");
this.uuid = Objects.requireNonNull(uuid, "uuid");
this.worldSupplier = worldSupplier;

// ALL account transactions will route auditing data through this
Expand Down

0 comments on commit 55ae491

Please sign in to comment.