Skip to content

NullPointerException when using Faker#locality #1170

@f-cramer

Description

@f-cramer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions