Skip to content

feat(clustering): make ClusterManager and public API open with JvmSuppressWildcards - #1759

Open
dkhawk wants to merge 1 commit into
mainfrom
feat/cluster-manager-open-api
Open

feat(clustering): make ClusterManager and public API open with JvmSuppressWildcards#1759
dkhawk wants to merge 1 commit into
mainfrom
feat/cluster-manager-open-api

Conversation

@dkhawk

@dkhawk dkhawk commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Makes ClusterManager and its public API methods/properties open to restore subclassing and test double capabilities following the Kotlin migration. Adds @JvmSuppressWildcards annotations to generic collection arguments (addItems, removeItems, diff) for clean Java interop without wildcard variance collisions.

Changes

  • Declared ClusterManager as open class ClusterManager<T : ClusterItem>
  • Added open modifier to all public properties, methods, and listeners (renderer, algorithm, setAlgorithm, setAnimation, clearItems, addItem, addItems, updateItem, removeItem, removeItems, diff, cluster, onCameraIdle, onMarkerClick, onInfoWindowClick, setOnClusterClickListener, etc.)
  • Added @JvmSuppressWildcards to generic collection arguments (Collection<@JvmSuppressWildcards T>) in addItems, removeItems, and diff

Reviewer

cc @LoyalAbbas

@dkhawk
dkhawk requested review from LoyalAbbas and kikoso August 24, 2026 22:28
@googlemaps-bot

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 44.78% -0.02% 🍏
Files changed 0%

Module Coverage
clustering 20.33% -0.06%
Files
Module File Coverage
clustering ClusterManager.kt 0% -1.19%

@LoyalAbbas LoyalAbbas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@kikoso

kikoso commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Could we add some tests in ClusterManagerTest.kt?

@kikoso kikoso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants