Skip to content

Commit 65ba0f4

Browse files
authored
Cleanup Jetbrains Rider analyzer warnings (#7719)
* Cleanup Jetbrains Rider analyzer warnings * Cleanup wrong comments
1 parent 752e73a commit 65ba0f4

File tree

10 files changed

+19
-18
lines changed

10 files changed

+19
-18
lines changed

src/contrib/cluster/Akka.Cluster.Sharding/ClusterSharding.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public virtual ShardId ShardId(string entityId, Msg? messageHint = null)
229229
/// <para>
230230
/// Typical usage of this extension:
231231
/// 1. At system startup on each cluster node by registering the supported entity types with
232-
/// the <see cref="ClusterSharding.Start"/> method
232+
/// the <see cref="ClusterSharding.Start(string,Props,ClusterShardingSettings,IMessageExtractor)"/> method
233233
/// 1. Retrieve the <see cref="Sharding.ShardRegion"/> actor for a named entity type with <see cref="ClusterSharding.ShardRegion"/>
234234
/// Settings can be configured as described in the `akka.cluster.sharding` section of the `reference.conf`.
235235
/// </para>
@@ -291,9 +291,9 @@ public virtual ShardId ShardId(string entityId, Msg? messageHint = null)
291291
/// <para>
292292
/// '''Delivery Semantics''':
293293
/// As long as a sender uses the same <see cref="Sharding.ShardRegion"/> actor to deliver messages to an entity
294-
/// actor the order of the messages is preserved. As long as the buffer limit is not reached
295-
/// messages are delivered on a best effort basis, with at-most once delivery semantics,
296-
/// in the same way as ordinary message sending. Reliable end-to-end messaging, with
294+
/// actor the order of the messages is preserved. As long as the buffer limit is not reached,
295+
/// messages will be delivered on a best effort basis, with at-most once delivery semantics,
296+
/// in the same way as an ordinary message sending. Reliable end-to-end messaging, with
297297
/// at-least-once semantics can be added by using `AtLeastOnceDelivery` in `akka-persistence`.
298298
/// </para>
299299
/// <para>
@@ -1417,7 +1417,9 @@ public async Task<IActorRef> StartProxyAsync(string typeName, string role, IMess
14171417
#pragma warning disable CS0419 // Ambiguous reference in cref attribute
14181418
/// <summary>
14191419
/// Retrieve the actor reference of the <see cref="Sharding.ShardRegion"/> actor responsible for the named entity type.
1420-
/// The entity type must be registered with the <see cref="ClusterSharding.Start"/> or <see cref="ClusterShardingGuardian.StartProxy"/> method before it
1420+
/// The entity type must be registered with the
1421+
/// <see cref="ClusterSharding.Start(string,Props,ClusterShardingSettings,IMessageExtractor)"/> or
1422+
/// <see cref="ClusterShardingGuardian.StartProxy"/> method before it
14211423
/// can be used here. Messages to the entity is always sent via the <see cref="Sharding.ShardRegion"/>.
14221424
/// </summary>
14231425
/// <param name="typeName">TBD</param>

src/core/Akka.Cluster.Tests/MemberOrderingModelBasedTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Property DistinctMemberAddressesMustCompareDifferently(Address[] addresse
5656
a1 = a2; // next member
5757
}
5858

59-
return true.Classify(true, "all distinct").Classify(false, "empty set"); ;
59+
return true.Classify(true, "all distinct").Classify(false, "empty set");
6060
}
6161
}
6262

src/core/Akka.Persistence.TCK/Performance/JournalPerfSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected JournalPerfSpec(Config config, string actorSystem, ITestOutputHelper o
6666

6767
internal IActorRef BenchActor(string pid, int replyAfter)
6868
{
69-
return Sys.ActorOf(Props.Create(() => new BenchActor(pid, _testProbe, EventsCount, false)));;
69+
return Sys.ActorOf(Props.Create(() => new BenchActor(pid, _testProbe, EventsCount, false)));
7070
}
7171

7272
internal (IActorRef aut,TestProbe probe) BenchActorNewProbe(string pid, int replyAfter)

src/core/Akka.Remote.Tests/Transport/DotNettySslSupportSpec.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ private static Config TestThumbprintConfig(string thumbPrint)
9898
}
9999
}
100100
}");
101-
return false
102-
? config
103-
: config.WithFallback(@"akka.remote.dot-netty.tcp.ssl {
101+
return config.WithFallback(@"akka.remote.dot-netty.tcp.ssl {
104102
suppress-validation = ""true""
105103
certificate {
106104
use-thumprint-over-file = true

src/core/Akka.Streams/Dsl/FlowWithContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public FlowWithContext<TIn, TCtxIn, TOut2, TCtx2, TMat3> ViaMaterialized<TOut2,
5454
FlowWithContext.From(Flow.FromGraph(Inner).ViaMaterialized(viaFlow, combine));
5555

5656
/// <summary>
57-
/// Context-preserving variant of <see cref="Flow{TIn, TOut, TMat2}.MapMaterializedValue{TMat2}(Func{TMat2, TMat2})"/>.
57+
/// Context-preserving variant of <see cref="Flow{TIn, TOut, TMat}.MapMaterializedValue{TMat2}(Func{TMat, TMat2})"/>.
5858
/// </summary>
5959
public FlowWithContext<TIn, TCtxIn, TOut, TCtxOut, TMat2> MapMaterializedValue<TMat2>(Func<TMat, TMat2> combine) =>
6060
FlowWithContext.From(Flow.FromGraph(Inner).MapMaterializedValue(combine));

src/core/Akka.Streams/Dsl/Source.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ public static Source<T, NotUsed> From<T>(IEnumerable<T> enumerable)
649649
/// beginning) regardless of when they subscribed.
650650
/// </summary>
651651
/// <typeparam name="T">TBD</typeparam>
652-
/// <param name=" asyncEnumerable">TBD</param>
652+
/// <param name="asyncEnumerable">TBD</param>
653653
/// <returns>TBD</returns>
654654
public static Source<T, NotUsed> From<T>(Func<IAsyncEnumerable<T>> asyncEnumerable)
655655
=> FromGraph(new AsyncEnumerable<T>(asyncEnumerable)).WithAttributes(DefaultAttributes.EnumerableSource);

src/core/Akka.Streams/Dsl/SourceWithContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public IRunnableGraph<TMat3> ToMaterialized<TMat2, TMat3>(IGraph<SinkShape<(TOut
7272
Source.FromGraph(Inner).ToMaterialized(sink, combine);
7373

7474
/// <summary>
75-
/// Context-preserving variant of <see cref="Source{TOut, TMat2}.MapMaterializedValue{TMat2}(Func{TMat2, TMat2})"/>.
75+
/// Context-preserving variant of <see cref="Source{TOut, TMat}.MapMaterializedValue{TMat2}(Func{TMat, TMat2})"/>.
7676
/// </summary>
7777
public SourceWithContext<TOut, TCtx, TMat2> MapMaterializedValue<TMat2>(Func<TMat, TMat2> combine) =>
7878
new(Source.FromGraph(Inner).MapMaterializedValue(combine));

src/core/Akka.Tests/Util/MessageBufferSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public override string ToString()
3939

4040
private IActorRef String2ActorRef(string s)
4141
{
42-
return new DummyActorRef(s); ;
42+
return new DummyActorRef(s);
4343
}
4444

4545
[Fact]

src/core/Akka/Actor/ActorRef.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,10 @@ public FunctionRef(ActorPath path, IActorRefProvider provider, EventStream event
10141014

10151015
public override ActorPath Path { get; }
10161016
public override IActorRefProvider Provider { get; }
1017+
[Obsolete("Use Context.Watch and Receive<Terminated> [1.1.0]")]
1018+
#pragma warning disable CS0809
10171019
public override bool IsTerminated => Volatile.Read(ref _watchedBy) == null;
1020+
#pragma warning restore CS0809
10181021

10191022
/// <summary>
10201023
/// Have this FunctionRef watch the given Actor. This method must not be

src/core/Akka/Pattern/RetrySupport.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,12 @@ Task<T> tryAttempt()
118118
var nextAttempt = attempted + 1;
119119
switch (delayFunction(nextAttempt))
120120
{
121-
case Option<TimeSpan> delay when delay.HasValue:
121+
case { HasValue: true } delay:
122122
return delay.Value.Ticks < 1
123123
? Retry(attempt, maxAttempts, delayFunction, nextAttempt, scheduler)
124124
: After(delay.Value, scheduler, () => Retry(attempt, maxAttempts, delayFunction, nextAttempt, scheduler));
125-
case Option<TimeSpan> _:
126-
return Retry(attempt, maxAttempts, delayFunction, nextAttempt, scheduler);
127125
default:
128-
throw new InvalidOperationException("The delayFunction of Retry should not return null.");
126+
return Retry(attempt, maxAttempts, delayFunction, nextAttempt, scheduler);
129127
}
130128
}
131129
return t;

0 commit comments

Comments
 (0)