Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - remove obsolete catch block in getLayerAs
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Oct 12, 2018
1 parent 9e7694c commit 899312a
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,8 @@ public Layer getLayer(@NonNull String layerId) {
*/
@Nullable
public <T extends Layer> T getLayerAs(@NonNull String layerId) {
try {
// noinspection unchecked
return (T) nativeMapView.getLayer(layerId);
} catch (ClassCastException exception) {
String message = String.format("Layer: %s is a different type: ", layerId);
Logger.e(TAG, message, exception);
MapStrictMode.strictModeViolation(message, exception);
return null;
}
// noinspection unchecked
return (T) nativeMapView.getLayer(layerId);
}

/**
Expand Down

0 comments on commit 899312a

Please sign in to comment.