Skip to content

Commit

Permalink
Use short-circuit AND operator in EventAggregator
Browse files Browse the repository at this point in the history
The HandlerExistsFor() method in EventAggregator uses the logical AND
operator & instead of the conditional logical AND operator &&.
  • Loading branch information
adamgauthier committed Sep 28, 2019
1 parent 3db4048 commit f04178c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Caliburn.Micro.Core/EventAggregator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public virtual bool HandlerExistsFor(Type messageType)
{
lock (_handlers)
{
return _handlers.Any(handler => handler.Handles(messageType) & !handler.IsDead);
return _handlers.Any(handler => handler.Handles(messageType) && !handler.IsDead);
}
}

Expand Down

0 comments on commit f04178c

Please sign in to comment.