mapbox / mapbox-gl-native-android

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
218 stars 114 forks source link

LocationUpdate throwing IllegalArgumentException on build when null location #699

Open ealfonso93 opened 3 years ago

ealfonso93 commented 3 years ago

https://github.com/mapbox/mapbox-gl-native-android/blob/6db4db9fffb7a696feb92438fa4bb6b21b65d117/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationUpdate.java#L111 LocationUpdate.Builder accepts Location as null, but later on when calling build() it will throw an exception if location is null since LocationUpdate constructor doesn't accept null values https://github.com/mapbox/mapbox-gl-native-android/blob/6db4db9fffb7a696feb92438fa4bb6b21b65d117/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationUpdate.java#L143

is this expected? There's still a legit case to pass location as null in here.