[android] fix layer ownership
This commit is contained in:
committed by
Ivo van Dongen
parent
7d2f18b5ed
commit
3a4a27c95f
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user