- Preconditions.checkNotNull(listener);
- Preconditions.checkArgument(!listeners.contains(listener),
- "Listener {} is already registered with ShardAccess {}", listener, this);
+ requireNonNull(listener);
+ checkArgument(!listeners.contains(listener), "Listener %s is already registered with ShardAccess %s", listener,
+ this);