Skip to content

Nullability of Polygon coordinates #881

@tobrun

Description

@tobrun

Reposting from downstream issue in mapbox/mapbox-gl-native#12745:


Not a bug, but there seems to be some inconsistency with the nullability of coordinates.

CoordinateContainer.coordinates is not annotated to indicate what the nullability is. Must of the static analysis treat this as unknown, and you may or may not check.

All the subclasses annotate the method as NonNull, except for Polygon, which marks it as Nullable. Seems strange that single implementation can be null but all the others cannot. And if I access from the parent interface, and don't get any warnings about not checking for null.

Android versions: N/A
Device models: N/A
Mapbox SDK versions: 6.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions