diff options
author | Cameron Mace <cameron@mapbox.com> | 2016-12-16 16:19:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-16 16:19:15 -0500 |
commit | 20b958301eb208fe9ed0ae8edfb14b6f3741d8f2 (patch) | |
tree | 94ae0ce250cda159be13f9a21cc70c92d4908974 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java | |
parent | f95b4838ea816b9da0c151a953a1f98f97c79a39 (diff) | |
download | qtlocation-mapboxgl-20b958301eb208fe9ed0ae8edfb14b6f3741d8f2.tar.gz |
Adds checkstyle to CI (#7442)
* adds checkstyle to CI
* fixed gradlew path
* resolved testapp checkstyle violations
* added back mapboxMap variable for test
* checkstyle annotations
* checkstyle SDK round 1
* maps package checkstyle
* rest of SDK checkstyle
* checkstyle gesture library
* checkstyle test
* finished rest of test checkstyle
* resolved all checkstyle errors
* fixed class name
* removed old test file
* fixed camera postion test
* fixed native crash
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java index 0856b117dc..6826fed1b5 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/Source.java @@ -4,52 +4,52 @@ package com.mapbox.mapboxsdk.style.sources; * Base Peer class for sources. see source.hpp for the other half of the peer. */ public abstract class Source { - private long nativePtr; - private boolean invalidated; - - /** - * Internal use - * - * @param nativePtr - pointer to native peer - */ - public Source(long nativePtr) { - this.nativePtr = nativePtr; - } - - public Source() { - } - - /** - * Retrieve the source id - * - * @return the source id - */ - public String getId() { - checkValidity(); - return nativeGetId(); - } - - /** - * Internal use - * - * @return the native peer pointer - */ - public long getNativePtr() { - return nativePtr; - } - - protected native String nativeGetId(); - - protected void checkValidity() { - if (invalidated) { - throw new RuntimeException("Layer has been invalidated. Request a new reference after adding"); - } - } - - /** - * Internal use - invalidates the source for further use (after adding it to the map) - */ - public final void invalidate() { - this.invalidated = true; + private long nativePtr; + private boolean invalidated; + + /** + * Internal use + * + * @param nativePtr - pointer to native peer + */ + public Source(long nativePtr) { + this.nativePtr = nativePtr; + } + + public Source() { + } + + /** + * Retrieve the source id + * + * @return the source id + */ + public String getId() { + checkValidity(); + return nativeGetId(); + } + + /** + * Internal use + * + * @return the native peer pointer + */ + public long getNativePtr() { + return nativePtr; + } + + protected native String nativeGetId(); + + protected void checkValidity() { + if (invalidated) { + throw new RuntimeException("Layer has been invalidated. Request a new reference after adding"); } + } + + /** + * Internal use - invalidates the source for further use (after adding it to the map) + */ + public final void invalidate() { + this.invalidated = true; + } } |