-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] fix static analized high priority issues #2391
Conversation
@@ -434,7 +434,7 @@ public override int GetHashCode() | |||
{ | |||
int hashCode = (_node != null ? _node.GetHashCode() : 0); | |||
hashCode = (hashCode * 397) ^ (_target != null ? _target.GetHashCode() : 0); | |||
hashCode = (hashCode * 397) ^ (_direction != null ? _direction.GetHashCode() : 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum can't be null
@@ -120,7 +120,7 @@ public void Enter(string name) | |||
/// </summary> | |||
public void Enter(TimeSpan timeout, ImmutableList<string> names) | |||
{ | |||
_system.Log.Debug("entering barriers {0}", names.Aggregate((a,b) => a = ", " + b)); | |||
_system.Log.Debug("entering barriers {0}", names.Aggregate((a, b) => "(" + a + "," + b + ")")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'a' is always rewritten in method, and more clear debug message
@@ -730,7 +730,6 @@ protected void Accepting() | |||
_endpoints.MarkAsQuarantined(gotuid.RemoteAddress, gotuid.Uid, | |||
Deadline.Now + _settings.QuarantineDuration); | |||
_eventPublisher.NotifyListeners(new QuarantinedEvent(gotuid.RemoteAddress, gotuid.Uid)); | |||
Context.Stop(pass.Endpoint); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if policy is WasGated Context.Stop(pass.Endpoint) will cause null reference exception
https://github.com/akka/akka/blob/master/akka-remote/src/main/scala/akka/remote/Remoting.scala#L704
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE catch.
@@ -59,31 +59,29 @@ private void FaultRecreate(Exception cause) | |||
if (System.Settings.DebugLifecycle) | |||
Publish(new Debug(_self.Path.ToString(), failedActor.GetType(), "Restarting")); | |||
|
|||
if (failedActor != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failedActor is _actor, _actor already checked on null
@@ -40,18 +40,9 @@ public static Task<T> Ask<T>(this ICanTell self, object message, TimeSpan? timeo | |||
if (provider == null) | |||
throw new ArgumentException("Unable to resolve the target Provider", nameof(self)); | |||
|
|||
ResolveReplyTo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same as do nothing
Neat. Nice work @maxim-s |
all high priority issues here https://gist.github.com/maxim-s/41ef6139bebe0e728594f5ded28f2b58