chore: resolve ErrorProne, Lint, and Kotlinc warnings across library, clustering, data, heatmaps, and ui modules - #1757
Open
dkhawk wants to merge 1 commit into
Open
chore: resolve ErrorProne, Lint, and Kotlinc warnings across library, clustering, data, heatmaps, and ui modules#1757dkhawk wants to merge 1 commit into
dkhawk wants to merge 1 commit into
Conversation
dkhawk
force-pushed
the
chore/lint-fixes
branch
from
August 21, 2026 22:19
5cdce08 to
e840c1a
Compare
Contributor
Code Coverage
Files
|
dkhawk
marked this pull request as ready for review
August 21, 2026 22:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves 41 static analysis and compiler warnings reported by ErrorProne, Android Lint, Rekaster, and Kotlinc in Critique CL 968695609 across five modules (
:library,:clustering,:data,:heatmaps,:ui).Detailed Changes by Category & Module
1.
:libraryModuleMarkerManager.java:ErrorProneMissingOverride: Added@OverridetonewCollection().JavaCodeClarityReturnMissingNullable: Added@NullabletogetInfoWindow()andgetInfoContents().JavaCodeClarityMissingJavadoc: Added Javadoc to theCollectioninner class.JavacWarningsRAW&UNCHECKED: ParametrizedCollectionasextends MapObjectManager<Marker, MarkerManager.Collection>.Collectionto eliminate raw type and unchecked cast warnings.CircleManager.java/GroundOverlayManager.java/PolygonManager.java/PolylineManager.java:JavaCodeClarityMissingJavadoc: Added Javadoc toCollectioninner classes.JavacWarningsRAW&UNCHECKED: ParametrizedCollectionasextends MapObjectManager<O, C>.CollectionforCircle,GroundOverlay,Polygon, andPolylineto eliminate raw type warnings.MapObjectManager.java:JavacWarningsRAW&UNCHECKED: UpdatedMapObjectManagerclass declaration toabstract class MapObjectManager<O, C extends MapObjectManager<O, C>.Collection>to fix the rawCollectiontype bound; added@SuppressWarnings("unchecked")to(C) thisinadd().StreetViewUtil.kt:JavaAndKotlinLintUnusedException: Passed the caughtIOExceptioneas thecauseparameter (IOException("Network error: ${e.message}", e)) and removede.printStackTrace().2.
:heatmapsModuleHeatmapTileProvider.kt:JavaAndKotlinLintScopeReceiverThis: Replacedapply { ... }inBuildermethods (data,weightedData,radius,gradient,opacity,maxIntensity) with explicitreturn thisto eliminateScopeReceiverThislint warnings and improve readability.3.
:dataModuleGoogleMapRenderer.kt:KotlinOptionalSuggestionsDiscourageForEach: Replaced 5forEachusages withforloops inaddLayer(),removeLayer(),clear(), andrenderPolygon()as per Kotlin coding conventions.4.
:clusteringModuleClusterRendererMultipleItems.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport java.util.concurrent.locks.Condition.KotlincWarningsCAN_BE_VAL_DELAYED_INITIALIZATION&UNNECESSARY_NOT_NULL_ASSERTION: Replacedvar renderTaskwithval renderTaskviasynchronizedexpression, eliminating!!assertions onrenderTask.KotlincWarningsUNNECESSARY_NOT_NULL_ASSERTION: Replacedmarker.position!!andanimateTo!!inanimateThenRemove()with a localval position = marker.positioncheck, avoiding!!and smart-cast errors.KotlinOptionalRefactoringSuggestionsElvisShortcuts: Replacedif (animateFrom == null) cluster.position else animateFromwithanimateFrom ?: cluster.position.DefaultAdvancedMarkersClusterRenderer.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport java.util.concurrent.locks.Condition.KotlincWarningsCAN_BE_VAL_DELAYED_INITIALIZATION&UNNECESSARY_NOT_NULL_ASSERTION: Replacedvar renderTaskwithval renderTask; eliminated!!onanimateTo!!,marker!!, andmarkerWithPosition.KotlinOptionalRefactoringSuggestionsElvisShortcuts: Replacedif (animateFrom == null) cluster.position else animateFromwithanimateFrom ?: cluster.position.DefaultClusterRenderer.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport java.util.concurrent.locks.Condition.KotlincWarningsCAN_BE_VAL_DELAYED_INITIALIZATION&UNNECESSARY_NOT_NULL_ASSERTION: Replacedvar renderTaskwithval renderTask; eliminated!!onanimateTo!!andmarkerWithPosition.KotlinOptionalRefactoringSuggestionsElvisShortcuts: Replacedif (animateFrom == null) cluster.position else animateFromwithanimateFrom ?: cluster.position.ClusterManager.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport android.os.AsyncTask.NonHierarchicalDistanceBasedAlgorithm.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport java.util.ArrayList.PreCachingAlgorithmDecorator.kt:KotlincWarningsUNNECESSARY_NOT_NULL_ASSERTION: RefactoredgetClustersInternal()usingkotlin.concurrent.withLockto eliminatevar resultsandreturn results!!.ClusterRenderer.kt:KotlincWarningsUNUSED_IMPORT: Removed unusedimport com.google.maps.android.clustering.ClusterManager.SphericalMercatorProjection.kt:KotlincWarningsDEPRECATION: UpdatedtoPoint()to returncom.google.maps.android.geometry.Pointinstead of the deprecatedcom.google.maps.android.projection.Point.5.
:uiModuleIconGenerator.kt:KotlincWarningsDEPRECATION: Replaced deprecatedTextView.setTextAppearance()andView.setBackgroundDrawable()withTextViewCompat.setTextAppearance()andViewCompat.setBackground().Verification
./gradlew :library:compileDebugKotlin :library:compileDebugJavaWithJavac :clustering:compileDebugKotlin :data:compileDebugKotlin :heatmaps:compileDebugKotlin :ui:compileDebugKotlin— BUILD SUCCESSFUL