From 20b958301eb208fe9ed0ae8edfb14b6f3741d8f2 Mon Sep 17 00:00:00 2001 From: Cameron Mace Date: Fri, 16 Dec 2016 16:19:15 -0500 Subject: 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 --- .../mapboxsdk/style/layers/PropertyValue.java | 74 +++++++++++----------- 1 file changed, 38 insertions(+), 36 deletions(-) (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java') diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java index 542ec46e1f..c404f07c76 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyValue.java @@ -1,6 +1,7 @@ package com.mapbox.mapboxsdk.style.layers; import android.support.annotation.Nullable; + import timber.log.Timber; /** @@ -8,48 +9,49 @@ import timber.log.Timber; */ public class PropertyValue { - private final Object value; + private final Object value; - /* package */ PropertyValue(Object value) { - this.value = value; - } + /* package */ PropertyValue(Object value) { + this.value = value; + } - public boolean isNull() { - return value == null; - } + public boolean isNull() { + return value == null; + } - public boolean isFunction() { - return !isNull() && value instanceof Function; - } + public boolean isFunction() { + return !isNull() && value instanceof Function; + } - public boolean isValue() { - return !isNull() && !isFunction(); - } + public boolean isValue() { + return !isNull() && !isFunction(); + } - @Nullable - public Function getFunction() { - if (isFunction()) { - //noinspection unchecked - return (Function) value; - } else { - Timber.w("not a function, try value"); - return null; - } + @Nullable + public Function getFunction() { + if (isFunction()) { + //noinspection unchecked + return (Function) value; + } else { + Timber.w("not a function, try value"); + return null; } - - @Nullable - public T getValue() { - if (isValue()) { - //noinspection unchecked - return (T) value; - } else { - Timber.w("not a value, try function"); - return null; - } + } + + @Nullable + public T getValue() { + if (isValue()) { + //noinspection unchecked + return (T) value; + } else { + Timber.w("not a value, try function"); + return null; } + } - @Override - public String toString() { - return String.format("%s (%s)", getClass().getSimpleName(), value != null ? value.getClass().getSimpleName() : null); - } + @Override + public String toString() { + return String.format("%s (%s)", getClass().getSimpleName(), value != null + ? value.getClass().getSimpleName() : null); + } } -- cgit v1.2.1