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

feat: Add nullability annotations to ClusterItem #687

Merged
merged 2 commits into from
Apr 13, 2020

Conversation

arriolac
Copy link
Member

@arriolac arriolac commented Apr 8, 2020

Adding nullability annotations to ClusterItem for better Kotlin-Java interop. Implementing ClusterItem will result in:

class MyModel : ClusterItem {
    override fun getPosition(): LatLng {
       // return here
    }

    override fun getTitle(): String? {
       // return here
    }

    override fun getSnippet(): String? {
       // return here
    }
}

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 8, 2020
@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

Merging #687 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #687   +/-   ##
=======================================
  Coverage   39.48%   39.48%           
=======================================
  Files          71       71           
  Lines        4047     4047           
  Branches      606      606           
=======================================
  Hits         1598     1598           
  Misses       2346     2346           
  Partials      103      103           
Impacted Files Coverage Δ
...ndroid/clustering/view/DefaultClusterRenderer.java 0.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c449bc9...a608094. Read the comment docs.

Copy link
Collaborator

@barbeau barbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

BTW, it makes me sad that you can't use Kotlin data class with fields like position to implement Java interface methods 😢:
https://youtrack.jetbrains.com/issue/KT-6653?_ga=2.30406975.1494223917.1585591891-1137021041.1573759593

@arriolac arriolac merged commit 741f832 into master Apr 13, 2020
@arriolac arriolac deleted the chris/cluster_item_nullability branch April 13, 2020 18:36
googlemaps-bot pushed a commit that referenced this pull request Apr 13, 2020
# [1.2.0](v1.1.0...v1.2.0) (2020-04-13)

### Features

* Add nullability annotations to ClusterItem ([#687](#687)) ([741f832](741f832))
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants