From 3a4a27c95f1c10c480532c46c4edb7b3120b7a2b Mon Sep 17 00:00:00 2001 From: Ivo van Dongen Date: Thu, 10 Nov 2016 12:07:25 +0100 Subject: [android] fix layer ownership --- .../com/mapbox/mapboxsdk/testapp/style/RuntimeStyleTests.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'platform/android/MapboxGLAndroidSDKTestApp') diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RuntimeStyleTests.java b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RuntimeStyleTests.java index f9ee324ead..d1318e713e 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RuntimeStyleTests.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/RuntimeStyleTests.java @@ -104,12 +104,8 @@ public class RuntimeStyleTests { mapboxMap.addLayer(layer); assertNotNull(mapboxMap.getLayer("building")); - try { - layer.setProperties(PropertyFactory.visibility(Property.VISIBLE)); - assertTrue("Never reached as the reference is invalid after adding", false); - } catch (Exception e) { - //Expected, reference is no longer valid - } + //Assure the reference still works + layer.setProperties(PropertyFactory.visibility(Property.VISIBLE)); } } -- cgit v1.2.1