Skip to content

Returning null instead of empty collection for SCIMAttribute #5

@jackychen-okta

Description

@jackychen-okta

Hi,

I notice that since a commit to fix the null strings, we return null instead of an empty collection. So if I do group.getMembers() on a GroupResource, it would be null and I can get a NPE on a foreach statement, e.g. for (Collection<Entry<String>> entry : group.getMembers()).

http://stackoverflow.com/questions/6077909/is-there-a-way-to-avoid-null-check-before-the-for-each-loop-iteration-starts

I can do a null check, but it seems extraneous to do that before a foreach.

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