Skip to content

Commit

Permalink
fix id check for conduit registry
Browse files Browse the repository at this point in the history
  • Loading branch information
rlnt committed Nov 16, 2023
1 parent 453c4cb commit 0dfc861
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void registerEnergyConduit(String id, String name, int transferRate) {
Preconditions.checkArgument(!id.contains(":"), "id must not contain a colon (:)");
Preconditions.checkArgument(!id.contains(" "), "id must not contain a space");
Preconditions.checkArgument(
CONDUITS.stream().anyMatch(conduit -> conduit.id().equals(id)),
CONDUITS.stream().noneMatch(conduit -> conduit.id().equals(id)),
"id must be unique"
);

Expand Down

0 comments on commit 0dfc861

Please sign in to comment.