Skip to content

Null pointer instead of empty list #5

@javierbg

Description

@javierbg

There's something that I don't find correct in the methods like Type.getResistance

If the resistance list is empty, it returns a null pointer, I found this really annoying while using the library. The list is already created, so why not return the empty list and avoid a null pointer exception when using a for loop on this list? If there's a reason then I'd like to know.

Thank you for reading and for the hard work!

Note: bear in mind that right now the PokeAPI doesn't include the type resistance information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions