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

Require context in AttributionParser.Options #13444

Merged
merged 1 commit into from
Nov 29, 2018

Conversation

LukasPaczos
Copy link
Member

If context has not been passed as an AttributionParser option, it was going to crash when getting a translated string.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
    at com.mapbox.mapboxsdk.attribution.AttributionParser.translateImproveThisMapAnchor(AttributionParser.java:146)
    at com.mapbox.mapboxsdk.attribution.AttributionParser.parseUrlSpan(AttributionParser.java:113)
    at com.mapbox.mapboxsdk.attribution.AttributionParser.parseAttributions(AttributionParser.java:98)
    at com.mapbox.mapboxsdk.attribution.AttributionParser.parse(AttributionParser.java:87)
    at com.mapbox.mapboxsdk.attribution.AttributionParser$Options.build(AttributionParser.java:302)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter.createAttributionString(MapSnapshotter.java:448)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter.createTextView(MapSnapshotter.java:429)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter.getAttributionMeasure(MapSnapshotter.java:365)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter.drawOverlay(MapSnapshotter.java:355)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter.addOverlay(MapSnapshotter.java:350)
    at com.mapbox.mapboxsdk.snapshotter.MapSnapshotter$1.run(MapSnapshotter.java:506)

@LukasPaczos LukasPaczos added Android Mapbox Maps SDK for Android SEMVER-MAJOR Requires a major release according to Semantic Versioning rules labels Nov 23, 2018
@LukasPaczos LukasPaczos added this to the android-v7.0.0-iowaska milestone Nov 23, 2018
@LukasPaczos LukasPaczos merged commit d54bc6a into master Nov 29, 2018
@LukasPaczos LukasPaczos deleted the lp-attribution-parser-context branch November 29, 2018 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android SEMVER-MAJOR Requires a major release according to Semantic Versioning rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants