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

Remove obsolete catch block in getLayerAs #13091

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Remove obsolete catch block in getLayerAs #13091

merged 1 commit into from
Oct 15, 2018

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Oct 12, 2018

Closes #12473, removed catch clause as noted in the issue:

(T) is reduced to (Layer) at Runtime and it just makes the compiler happy, but changes nothing. Therefor the catch block will never run. This method removes some need for the callers to cast, but it will not protect them from CastClassExceptions.

The cast class exception is expected, provides same developer experience as with similar constructs in other libraries as for example ButterKnife.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Oct 12, 2018
@tobrun tobrun added this to the android-v6.7.0 milestone Oct 12, 2018
@tobrun tobrun self-assigned this Oct 12, 2018
Copy link
Member

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

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

Javadoc for the method should be updated as well.

@tobrun
Copy link
Member Author

tobrun commented Oct 15, 2018

#13091 (review) was addressed in 7b4b4bb

@tobrun tobrun requested review from zugaldia and osana October 15, 2018 10:36
@tobrun tobrun merged commit 787bbdf into master Oct 15, 2018
@tobrun tobrun deleted the tvn-layers-as branch June 25, 2019 11:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants