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

NullPointerException when using Faker#locality #1170

Closed
f-cramer opened this issue Apr 24, 2024 · 3 comments · Fixed by #1172
Closed

NullPointerException when using Faker#locality #1170

f-cramer opened this issue Apr 24, 2024 · 3 comments · Fixed by #1172

Comments

@f-cramer
Copy link

Describe the bug
I get a NullPointerException when calling Faker#locality. The message is java.lang.NullPointerException: Cannot invoke "java.nio.file.Path.toString()" because the return value of "java.nio.file.Path.getFileName()" is null

To Reproduce
https://github.com/f-cramer/datafaker-npe
Just run gradlew test to reproduce

Expected behavior
Initialization of Locality should complete without throwing an exception

Versions:

  • OS: Windows 11, could also reproduce in a Github Action running on ubuntu-latest
  • JDK 17
  • Faker 2.2.1, but seems to happen since at leat 2.1.0
@bodiam
Copy link
Contributor

bodiam commented Apr 25, 2024

Thanks for reporting, looking into it!

@bodiam
Copy link
Contributor

bodiam commented Apr 25, 2024

2.2.2 has been released to address this issue.

@f-cramer
Copy link
Author

That great. Thanks for the very quick fix.

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

Successfully merging a pull request may close this issue.

2 participants