Skip to content

Commit

Permalink
Remove checking for > and *
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasfp committed Feb 7, 2024
1 parent ff39161 commit 39dd523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NATS.Client.JetStream/NatsJSContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ internal static void ThrowIfInvalidStreamName([NotNull] string? name, [CallerArg
#endif

var nameSpan = name.AsSpan();
if (nameSpan.IndexOfAny(" .*>") >= 0)
if (nameSpan.IndexOfAny(" .") >= 0)
{
ThrowInvalidStreamNameException(paramName);
}
Expand Down Expand Up @@ -261,7 +261,7 @@ internal async ValueTask<NatsJSResponse<TResponse>> JSRequestAsync<TRequest, TRe

[DoesNotReturn]
private static void ThrowInvalidStreamNameException(string? paramName) =>
throw new ArgumentException("Stream name cannot contain ' ', '.', '*' or '>'", paramName);
throw new ArgumentException("Stream name cannot contain ' ', '.'", paramName);

[DoesNotReturn]
private static void ThrowEmptyException(string? paramName) =>
Expand Down

0 comments on commit 39dd523

Please sign in to comment.