Skip to content
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

IsNobody throws NRE #5213

Closed
BaterPL opened this issue Aug 19, 2021 · 3 comments
Closed

IsNobody throws NRE #5213

BaterPL opened this issue Aug 19, 2021 · 3 comments

Comments

@BaterPL
Copy link

BaterPL commented Aug 19, 2021

Version Information
Version of Akka.NET? v1.4.24
Which Akka.NET Modules? Akka

Describe the bug
After changes in IsNobody implementation, our tests started failing because of NRE. It seems that the new implementation assumes that Path is not null which might not be true. In our case, it's caused by the mock of IActorRef.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare a test where you mock IActorRef using some mocking library (e.g. NSubstitute)
  2. Call IsNobody() on mock
  3. NRE is thrown

Code sample: https://github.com/BaterPL/akka-isNobody-example/blob/main/src/IsNobodyTests.cs

Expected behavior
IsNobody returns true instead of throwing an exception

Actual behavior
NullReferenceException

Environment
Windows, .NET 5

@Aaronontheweb
Copy link
Member

Thanks - we should patch this

@Aaronontheweb Aaronontheweb added this to the 1.4.25 milestone Aug 19, 2021
@jlaur
Copy link

jlaur commented Aug 20, 2021

See #5114

@Aaronontheweb
Copy link
Member

closed via #5220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants