From d480a3993dbfa281805f5d12da791790ebdd8202 Mon Sep 17 00:00:00 2001 From: Mateusz Rzeszutek Date: Wed, 7 Jun 2023 12:40:26 +0200 Subject: [PATCH] Bump spotless to 6.19 (#560) * Bump spotless to 6.19 * fix broken import --- buildSrc/build.gradle.kts | 2 +- .../rum/internal/AndroidResource.java | 5 +--- .../rum/internal/ApplicationStateWatcher.java | 3 --- .../DefaultingActivityLifecycleCallbacks.java | 1 - .../GlobalAttributesSpanAppender.java | 1 - .../internal/InstrumentedApplicationImpl.java | 1 - .../rum/internal/OpenTelemetryRum.java | 1 - .../rum/internal/OpenTelemetryRumBuilder.java | 2 -- .../opentelemetry/rum/internal/SessionId.java | 2 -- .../internal/SessionIdRatioBasedSampler.java | 1 - .../rum/internal/SessionIdTimeoutHandler.java | 1 - .../rum/internal/SpanDataModifier.java | 1 - .../rum/internal/SpanFilterBuilder.java | 1 - .../InstrumentedApplication.java | 1 - .../instrumentation/ScreenNameExtractor.java | 1 - .../activity/ActivityCallbacks.java | 2 -- .../activity/ActivityTracer.java | 3 --- .../activity/ActivityTracerCache.java | 3 --- .../activity/Pre29ActivityCallbacks.java | 2 -- .../Pre29VisibleScreenLifecycleBinding.java | 2 -- .../RumFragmentActivityRegisterer.java | 2 -- .../VisibleScreenLifecycleBinding.java | 2 -- .../activity/VisibleScreenTracker.java | 2 -- .../instrumentation/anr/AnrDetector.java | 2 -- .../anr/AnrDetectorBuilder.java | 2 -- .../anr/AnrDetectorToggler.java | 2 -- .../instrumentation/anr/AnrWatcher.java | 2 -- .../instrumentation/crash/CrashReporter.java | 1 - .../crash/CrashReporterBuilder.java | 1 - .../crash/CrashReportingExceptionHandler.java | 2 -- .../fragment/FragmentTracer.java | 1 - .../RumFragmentLifecycleCallbacks.java | 3 --- .../AndroidLifecycleInstrumentation.java | 3 --- ...ndroidLifecycleInstrumentationBuilder.java | 1 - .../instrumentation/network/Carrier.java | 2 -- .../network/CarrierFinder.java | 1 - .../network/CurrentNetwork.java | 2 -- .../CurrentNetworkAttributesExtractor.java | 1 - .../network/CurrentNetworkProvider.java | 3 --- .../network/NetworkApplicationListener.java | 1 - .../network/NetworkChangeMonitor.java | 1 - .../network/NetworkChangeMonitorBuilder.java | 1 - .../network/PostApi28NetworkDetector.java | 1 - .../slowrendering/SlowRenderListener.java | 3 --- .../slowrendering/SlowRenderingDetector.java | 2 -- .../SlowRenderingDetectorBuilder.java | 2 -- .../startup/AppStartupTimer.java | 3 --- .../rum/internal/util/ActiveSpan.java | 2 -- .../rum/internal/AndroidResourceTest.java | 4 ---- .../internal/ApplicationStateWatcherTest.java | 2 -- .../GlobalAttributesSpanAppenderTest.java | 2 -- .../rum/internal/ModifiedSpanDataTest.java | 5 +--- .../internal/OpenTelemetryRumBuilderTest.java | 6 +---- .../internal/SessionIdChangeTracerTest.java | 5 +--- .../SessionIdRatioBasedSamplerTest.java | 6 ++--- .../internal/SessionIdSpanAppenderTest.java | 2 -- .../rum/internal/SessionIdTest.java | 6 ++--- .../internal/SessionIdTimeoutHandlerTest.java | 4 +--- .../rum/internal/SpanDataModifierTest.java | 14 ++++------- .../activity/ActivityCallbacksTest.java | 8 ++----- .../activity/ActivityTracerCacheTest.java | 6 ++--- .../activity/ActivityTracerTest.java | 6 +---- .../Pre29ActivityLifecycleCallbacksTest.java | 8 ++----- ...re29VisibleScreenLifecycleBindingTest.java | 1 - .../RumFragmentActivityRegistererTest.java | 2 -- .../VisibleScreenLifecycleBindingTest.java | 1 - .../activity/VisibleScreenTrackerTest.java | 2 -- .../instrumentation/anr/AnrDetectorTest.java | 8 ++----- .../anr/AnrDetectorTogglerTest.java | 7 +++--- .../instrumentation/anr/AnrWatcherTest.java | 2 -- .../anr/StackTraceFormatterTest.java | 1 - .../crash/CrashReporterTest.java | 7 ++---- .../CrashReportingExceptionHandlerTest.java | 4 +--- .../fragment/FragmentCallbackTestHarness.java | 1 - .../fragment/FragmentTracerTest.java | 6 +---- .../RumFragmentLifecycleCallbacksTest.java | 8 ++----- .../fragment/ScreenNameExtractorTest.java | 3 --- .../network/CarrierFinderTest.java | 1 - ...CurrentNetworkAttributesExtractorTest.java | 3 --- .../network/CurrentNetworkProviderTest.java | 4 +--- .../NetworkAttributesSpanAppenderTest.java | 1 - .../network/NetworkChangeMonitorTest.java | 6 +---- .../network/NetworkDetectorTest.java | 2 -- .../network/PostApi28NetworkDetectorTest.java | 2 +- .../network/SimpleNetworkDetectorTest.java | 2 -- .../slowrendering/SlowRenderListenerTest.java | 17 +++++--------- .../startup/AppStartupTimerTest.java | 5 +--- .../sample/ExampleInstrumentedTest.java | 2 -- .../android/sample/DemoAnimatedView.java | 2 -- .../splunk/android/sample/FirstFragment.java | 23 +++++++------------ .../android/sample/MailDialogFragment.java | 3 --- .../splunk/android/sample/MainActivity.java | 4 ---- .../android/sample/SampleApplication.java | 3 --- .../splunk/android/sample/SecondFragment.java | 4 ---- .../android/sample/ShopWebViewFragment.java | 2 -- .../splunk/android/sample/VolleyExample.java | 2 -- .../android/sample/WebViewFragment.java | 3 --- .../java/com/splunk/rum/RequestWrapper.java | 1 - .../java/com/splunk/rum/TracingHurlStack.java | 3 --- .../rum/VolleyHttpClientAttributesGetter.java | 3 --- .../rum/VolleyNetClientAttributesGetter.java | 2 -- .../VolleyResponseAttributesExtractor.java | 2 -- .../java/com/splunk/rum/VolleyTracing.java | 2 -- .../com/splunk/rum/VolleyTracingBuilder.java | 2 -- .../java/com/splunk/rum/TestRequestQueue.java | 1 - .../rum/TracingHurlStackExceptionTest.java | 8 ++----- .../com/splunk/rum/TracingHurlStackTest.java | 16 +++++-------- .../VolleyHttpClientAttributesGetterTest.java | 8 +++---- ...VolleyResponseAttributesExtractorTest.java | 6 +---- .../splunk/rum/CrashComponentExtractor.java | 1 - .../com/splunk/rum/CustomZipkinEncoder.java | 5 ++-- .../splunk/rum/DeviceSpanStorageLimiter.java | 3 --- .../com/splunk/rum/DiskToZipkinExporter.java | 4 ---- .../main/java/com/splunk/rum/FileSender.java | 8 ++----- .../main/java/com/splunk/rum/FileUtils.java | 1 - .../com/splunk/rum/InitializationEvents.java | 1 - .../java/com/splunk/rum/LogToSpanBridge.java | 1 - .../splunk/rum/MemoryBufferingExporter.java | 3 --- .../java/com/splunk/rum/NoOpSplunkRum.java | 5 +--- .../java/com/splunk/rum/RumInitializer.java | 11 ++------- .../rum/RumResponseAttributesExtractor.java | 1 - .../splunk/rum/RuntimeDetailsExtractor.java | 3 --- .../splunk/rum/ServerTimingHeaderParser.java | 1 - .../com/splunk/rum/SpanFilterBuilder.java | 2 +- .../main/java/com/splunk/rum/SplunkRum.java | 8 ++----- .../java/com/splunk/rum/SplunkRumBuilder.java | 3 --- .../splunk/rum/SplunkScreenNameExtractor.java | 3 --- .../splunk/rum/SplunkSpanDataModifier.java | 3 --- .../com/splunk/rum/ThrottlingExporter.java | 2 -- .../com/splunk/rum/ZipkinToDiskSender.java | 10 +++----- .../rum/ZipkinWriteToDiskExporterFactory.java | 5 +--- .../com/splunk/rum/BandwidthTrackerTest.java | 5 ++-- .../rum/CrashComponentExtractorTest.java | 2 -- .../splunk/rum/CustomZipkinEncoderTest.java | 2 -- .../rum/DeviceSpanStorageLimiterTest.java | 5 ++-- .../splunk/rum/DiskToZipkinExporterTest.java | 6 ++--- .../java/com/splunk/rum/FileSenderTest.java | 17 ++++++-------- .../com/splunk/rum/LogToSpanBridgeTest.java | 5 +--- .../rum/MemoryBufferingExporterTest.java | 8 +++---- .../com/splunk/rum/NoOpSplunkRumTest.java | 3 --- .../com/splunk/rum/RumInitializerTest.java | 17 ++++---------- .../RumResponseAttributesExtractorTest.java | 4 ---- .../rum/RuntimeDetailsExtractorTest.java | 6 +---- .../rum/ScreenAttributesAppenderTest.java | 2 -- .../com/splunk/rum/SplunkRumBuilderTest.java | 2 -- .../java/com/splunk/rum/SplunkRumTest.java | 13 ++++------- .../rum/SplunkSpanDataModifierTest.java | 11 +++------ .../splunk/rum/ThrottlingExporterTest.java | 14 ++++------- .../java/com/splunk/rum/WorkflowTest.java | 4 +--- .../splunk/rum/ZipkinToDiskSenderTest.java | 15 +++++------- 150 files changed, 119 insertions(+), 475 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ed91cec52..7f2556892 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -22,7 +22,7 @@ dependencies { // keep this version in sync with /build.gradle.kts implementation("com.android.tools.build:gradle:8.0.2") - implementation("com.diffplug.spotless:spotless-plugin-gradle:6.18.0") + implementation("com.diffplug.spotless:spotless-plugin-gradle:6.19.0") implementation("net.ltgt.gradle:gradle-errorprone-plugin:3.1.0") implementation("net.ltgt.gradle:gradle-nullaway-plugin:1.6.0") } diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/AndroidResource.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/AndroidResource.java index 5cec01ad0..ababe4754 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/AndroidResource.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/AndroidResource.java @@ -26,13 +26,10 @@ import android.app.Application; import android.os.Build; - import io.opentelemetry.sdk.resources.Resource; import io.opentelemetry.sdk.resources.ResourceBuilder; - -import opentelemetry.rum.instrumentation.R; - import java.util.function.Supplier; +import opentelemetry.rum.instrumentation.R; final class AndroidResource { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/ApplicationStateWatcher.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/ApplicationStateWatcher.java index c233dee01..4df387b61 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/ApplicationStateWatcher.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/ApplicationStateWatcher.java @@ -17,11 +17,8 @@ package io.opentelemetry.rum.internal; import android.app.Activity; - import androidx.annotation.NonNull; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; - import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/DefaultingActivityLifecycleCallbacks.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/DefaultingActivityLifecycleCallbacks.java index b46d09e2b..1dad341dd 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/DefaultingActivityLifecycleCallbacks.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/DefaultingActivityLifecycleCallbacks.java @@ -19,7 +19,6 @@ import android.app.Activity; import android.app.Application; import android.os.Bundle; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppender.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppender.java index 048dd10b2..75f8885e6 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppender.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppender.java @@ -24,7 +24,6 @@ import io.opentelemetry.sdk.trace.ReadWriteSpan; import io.opentelemetry.sdk.trace.ReadableSpan; import io.opentelemetry.sdk.trace.SpanProcessor; - import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/InstrumentedApplicationImpl.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/InstrumentedApplicationImpl.java index 7fc9dec90..a8274d4e7 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/InstrumentedApplicationImpl.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/InstrumentedApplicationImpl.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal; import android.app.Application; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; import io.opentelemetry.sdk.OpenTelemetrySdk; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRum.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRum.java index f3b7d9eaa..c8d1a3dc2 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRum.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRum.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal; import android.app.Application; - import io.opentelemetry.api.OpenTelemetry; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilder.java index 013dae28c..6c4190392 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilder.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal; import android.app.Application; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; import io.opentelemetry.sdk.OpenTelemetrySdk; @@ -28,7 +27,6 @@ import io.opentelemetry.sdk.resources.Resource; import io.opentelemetry.sdk.trace.SdkTracerProvider; import io.opentelemetry.sdk.trace.SdkTracerProviderBuilder; - import java.util.ArrayList; import java.util.List; import java.util.function.BiFunction; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionId.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionId.java index fe12ec4dd..e61c15d4d 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionId.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionId.java @@ -19,10 +19,8 @@ import static java.util.Objects.requireNonNull; import androidx.annotation.Nullable; - import io.opentelemetry.api.trace.TraceId; import io.opentelemetry.sdk.common.Clock; - import java.util.Random; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSampler.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSampler.java index 05d257ca3..bba3b85b4 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSampler.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSampler.java @@ -22,7 +22,6 @@ import io.opentelemetry.sdk.trace.data.LinkData; import io.opentelemetry.sdk.trace.samplers.Sampler; import io.opentelemetry.sdk.trace.samplers.SamplingResult; - import java.util.List; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandler.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandler.java index aa2c51177..791aa43fc 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandler.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandler.java @@ -18,7 +18,6 @@ import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; import io.opentelemetry.sdk.common.Clock; - import java.util.concurrent.TimeUnit; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanDataModifier.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanDataModifier.java index 25e61d52d..dda96f557 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanDataModifier.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanDataModifier.java @@ -22,7 +22,6 @@ import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanFilterBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanFilterBuilder.java index 49a807bb1..3f4638d97 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanFilterBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/SpanFilterBuilder.java @@ -18,7 +18,6 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.util.HashMap; import java.util.Map; import java.util.function.Function; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/InstrumentedApplication.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/InstrumentedApplication.java index 55014a747..f853bd050 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/InstrumentedApplication.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/InstrumentedApplication.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation; import android.app.Application; - import io.opentelemetry.rum.internal.OpenTelemetryRum; import io.opentelemetry.sdk.OpenTelemetrySdk; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/ScreenNameExtractor.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/ScreenNameExtractor.java index 7ffc2be25..edceeb900 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/ScreenNameExtractor.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/ScreenNameExtractor.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation; import android.app.Activity; - import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacks.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacks.java index 7f4c5425a..55b1ed25b 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacks.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacks.java @@ -18,10 +18,8 @@ import android.app.Activity; import android.os.Bundle; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; public class ActivityCallbacks implements DefaultingActivityLifecycleCallbacks { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracer.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracer.java index 854f32b40..6dd307ba4 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracer.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracer.java @@ -21,10 +21,8 @@ import static io.opentelemetry.rum.internal.RumConstants.START_TYPE_KEY; import android.app.Activity; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.SpanBuilder; @@ -32,7 +30,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; import io.opentelemetry.rum.internal.util.ActiveSpan; - import java.util.concurrent.atomic.AtomicReference; public class ActivityTracer { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCache.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCache.java index 57404d804..372e42410 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCache.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCache.java @@ -17,13 +17,10 @@ package io.opentelemetry.rum.internal.instrumentation.activity; import android.app.Activity; - import androidx.annotation.VisibleForTesting; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; - import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityCallbacks.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityCallbacks.java index 61a713902..60f033bc1 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityCallbacks.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityCallbacks.java @@ -18,10 +18,8 @@ import android.app.Activity; import android.os.Bundle; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; public class Pre29ActivityCallbacks implements DefaultingActivityLifecycleCallbacks { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBinding.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBinding.java index e0d781f0f..4b8c0c4c4 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBinding.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBinding.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.activity; import android.app.Activity; - import androidx.annotation.NonNull; - import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegisterer.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegisterer.java index ed66ad91c..b4f104506 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegisterer.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegisterer.java @@ -19,12 +19,10 @@ import android.app.Activity; import android.app.Application; import android.os.Bundle; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; - import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBinding.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBinding.java index 52f1be8bc..bbfa89301 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBinding.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBinding.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.activity; import android.app.Activity; - import androidx.annotation.NonNull; - import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTracker.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTracker.java index 77cff5e02..87fa24d30 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTracker.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTracker.java @@ -17,12 +17,10 @@ package io.opentelemetry.rum.internal.instrumentation.activity; import android.app.Activity; - import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.Fragment; import androidx.navigation.fragment.NavHostFragment; - import java.util.concurrent.atomic.AtomicReference; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetector.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetector.java index 378557a8b..469e48f3b 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetector.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetector.java @@ -18,13 +18,11 @@ import android.os.Handler; import android.os.Looper; - import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.trace.StatusCode; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; - import java.util.List; import java.util.concurrent.ScheduledExecutorService; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorBuilder.java index 8876f762f..7cd00e95e 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorBuilder.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.anr; import android.os.Looper; - import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executors; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorToggler.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorToggler.java index ddf656606..f28d012cc 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorToggler.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorToggler.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.anr; import androidx.annotation.Nullable; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; - import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcher.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcher.java index bc5008377..d4abf0ca2 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcher.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcher.java @@ -17,10 +17,8 @@ package io.opentelemetry.rum.internal.instrumentation.anr; import android.os.Handler; - import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; - import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporter.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporter.java index b3f355754..4c23724f6 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporter.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporter.java @@ -20,7 +20,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; - import java.util.List; /** Entrypoint for installing the crash reporting instrumentation. */ diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterBuilder.java index e25e0303d..49e11921e 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterBuilder.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation.crash; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; - import java.util.ArrayList; import java.util.List; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandler.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandler.java index ac6a9b523..709af643a 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandler.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandler.java @@ -17,12 +17,10 @@ package io.opentelemetry.rum.internal.instrumentation.crash; import androidx.annotation.NonNull; - import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.SdkTracerProvider; - import java.util.concurrent.TimeUnit; final class CrashReportingExceptionHandler implements Thread.UncaughtExceptionHandler { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracer.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracer.java index 6fe4c7058..390f6bea3 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracer.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracer.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation.fragment; import androidx.fragment.app.Fragment; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacks.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacks.java index 7a080b296..a8c4184ff 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacks.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacks.java @@ -19,17 +19,14 @@ import android.content.Context; import android.os.Bundle; import android.view.View; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.rum.internal.util.ActiveSpan; - import java.util.HashMap; import java.util.Map; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentation.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentation.java index 1fbe7071b..2440f252a 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentation.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentation.java @@ -18,9 +18,7 @@ import android.app.Application; import android.os.Build; - import androidx.annotation.NonNull; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; @@ -33,7 +31,6 @@ import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.rum.internal.instrumentation.fragment.RumFragmentLifecycleCallbacks; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; - import java.util.function.Function; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentationBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentationBuilder.java index e2506655e..d943b6bb6 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentationBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/lifecycle/AndroidLifecycleInstrumentationBuilder.java @@ -20,7 +20,6 @@ import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; - import java.util.function.Function; public class AndroidLifecycleInstrumentationBuilder { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/Carrier.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/Carrier.java index 850c52245..a6f61d292 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/Carrier.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/Carrier.java @@ -18,10 +18,8 @@ import android.os.Build; import android.telephony.TelephonyManager; - import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; - import java.util.Objects; @RequiresApi(api = Build.VERSION_CODES.P) diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinder.java index e35759fb6..23ca02a88 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinder.java @@ -18,7 +18,6 @@ import android.os.Build; import android.telephony.TelephonyManager; - import androidx.annotation.RequiresApi; @RequiresApi(api = Build.VERSION_CODES.P) diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetwork.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetwork.java index ca1b3c413..4a7ab9d56 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetwork.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetwork.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.network; import android.os.Build; - import androidx.annotation.Nullable; - import java.util.Objects; /** A value class representing the current network that the device is connected to. */ diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractor.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractor.java index 2a6835111..3662cb1ae 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractor.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractor.java @@ -24,7 +24,6 @@ import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NET_HOST_CONNECTION_TYPE; import androidx.annotation.Nullable; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProvider.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProvider.java index ddf3df825..33e633b2f 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProvider.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProvider.java @@ -24,11 +24,8 @@ import android.net.NetworkRequest; import android.os.Build; import android.util.Log; - import androidx.annotation.NonNull; - import io.opentelemetry.rum.internal.RumConstants; - import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Supplier; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkApplicationListener.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkApplicationListener.java index 7762f9079..6cdd19919 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkApplicationListener.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkApplicationListener.java @@ -22,7 +22,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; - import java.util.concurrent.atomic.AtomicBoolean; class NetworkApplicationListener implements ApplicationStateListener { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitor.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitor.java index 162ab7643..7cd12e03d 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitor.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitor.java @@ -20,7 +20,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; - import java.util.ArrayList; import java.util.List; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorBuilder.java index e4b927e43..992562287 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorBuilder.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation.network; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; - import java.util.ArrayList; import java.util.List; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetector.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetector.java index 94494f6c9..1bd9589a8 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetector.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetector.java @@ -27,7 +27,6 @@ import android.net.NetworkCapabilities; import android.os.Build; import android.telephony.TelephonyManager; - import androidx.annotation.RequiresApi; import androidx.core.app.ActivityCompat; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListener.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListener.java index cf26e6c9c..3f717a195 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListener.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListener.java @@ -28,16 +28,13 @@ import android.util.SparseIntArray; import android.view.FrameMetrics; import android.view.Window; - import androidx.annotation.GuardedBy; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; - import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; import io.opentelemetry.rum.internal.RumConstants; - import java.time.Duration; import java.time.Instant; import java.util.concurrent.ConcurrentHashMap; diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetector.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetector.java index 6ac64a6cc..152cfe3f2 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetector.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetector.java @@ -18,10 +18,8 @@ import android.os.Build; import android.util.Log; - import io.opentelemetry.rum.internal.RumConstants; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; - import java.time.Duration; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetectorBuilder.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetectorBuilder.java index 9e2a30937..4ec87c72e 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetectorBuilder.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderingDetectorBuilder.java @@ -17,9 +17,7 @@ package io.opentelemetry.rum.internal.instrumentation.slowrendering; import android.util.Log; - import io.opentelemetry.rum.internal.RumConstants; - import java.time.Duration; /** diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimer.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimer.java index e65184974..259b22b23 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimer.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimer.java @@ -21,17 +21,14 @@ import android.os.Bundle; import android.os.Handler; import android.util.Log; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.DefaultingActivityLifecycleCallbacks; import io.opentelemetry.rum.internal.RumConstants; import io.opentelemetry.rum.internal.util.AnchoredClock; import io.opentelemetry.sdk.common.Clock; - import java.util.concurrent.TimeUnit; public class AppStartupTimer { diff --git a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/util/ActiveSpan.java b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/util/ActiveSpan.java index 3a10a70d0..2e4430bfc 100644 --- a/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/util/ActiveSpan.java +++ b/opentelemetry-android-instrumentation/src/main/java/io/opentelemetry/rum/internal/util/ActiveSpan.java @@ -19,10 +19,8 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import androidx.annotation.Nullable; - import io.opentelemetry.api.trace.Span; import io.opentelemetry.context.Scope; - import java.util.function.Supplier; public class ActiveSpan { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/AndroidResourceTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/AndroidResourceTest.java index 0f768d330..0b65acda5 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/AndroidResourceTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/AndroidResourceTest.java @@ -23,18 +23,14 @@ import static io.opentelemetry.semconv.resource.attributes.ResourceAttributes.OS_TYPE; import static io.opentelemetry.semconv.resource.attributes.ResourceAttributes.OS_VERSION; import static io.opentelemetry.semconv.resource.attributes.ResourceAttributes.SERVICE_NAME; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.when; import android.app.Application; import android.content.pm.ApplicationInfo; import android.os.Build; - import io.opentelemetry.sdk.resources.Resource; - import opentelemetry.rum.instrumentation.R; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Answers; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ApplicationStateWatcherTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ApplicationStateWatcherTest.java index 2e1828fd5..618278a02 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ApplicationStateWatcherTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ApplicationStateWatcherTest.java @@ -19,9 +19,7 @@ import static org.mockito.Mockito.inOrder; import android.app.Activity; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppenderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppenderTest.java index 6405c5665..6660cc793 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppenderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/GlobalAttributesSpanAppenderTest.java @@ -18,7 +18,6 @@ import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; - import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; @@ -26,7 +25,6 @@ import io.opentelemetry.api.common.Attributes; import io.opentelemetry.context.Context; import io.opentelemetry.sdk.trace.ReadWriteSpan; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ModifiedSpanDataTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ModifiedSpanDataTest.java index 5c17193ea..ef27fddf9 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ModifiedSpanDataTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/ModifiedSpanDataTest.java @@ -17,10 +17,8 @@ package io.opentelemetry.rum.internal; import static io.opentelemetry.api.common.AttributeKey.stringKey; - -import static org.junit.jupiter.api.Assertions.assertEquals; - import static java.util.Collections.emptyList; +import static org.junit.jupiter.api.Assertions.assertEquals; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanContext; @@ -34,7 +32,6 @@ import io.opentelemetry.sdk.testing.trace.TestSpanData; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; - import org.junit.jupiter.api.Test; class ModifiedSpanDataTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilderTest.java index 0369eb543..97cdac65c 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/OpenTelemetryRumBuilderTest.java @@ -19,19 +19,17 @@ import static io.opentelemetry.rum.internal.RumConstants.SESSION_ID_KEY; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; - import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.verify; import android.app.Activity; import android.app.Application; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; import io.opentelemetry.sdk.resources.Resource; import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; - +import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; @@ -39,8 +37,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.List; - @ExtendWith(MockitoExtension.class) class OpenTelemetryRumBuilderTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdChangeTracerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdChangeTracerTest.java index 37dd7dea0..d5a4fb1f6 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdChangeTracerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdChangeTracerTest.java @@ -17,20 +17,17 @@ package io.opentelemetry.rum.internal; import static io.opentelemetry.rum.internal.RumConstants.PREVIOUS_SESSION_ID_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; - class SessionIdChangeTracerTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSamplerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSamplerTest.java index 21bec7fde..bef9749ff 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSamplerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdRatioBasedSamplerTest.java @@ -28,15 +28,13 @@ import io.opentelemetry.sdk.trace.data.LinkData; import io.opentelemetry.sdk.trace.samplers.Sampler; import io.opentelemetry.sdk.trace.samplers.SamplingDecision; - +import java.util.Collections; +import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.Collections; -import java.util.List; - @ExtendWith(MockitoExtension.class) class SessionIdRatioBasedSamplerTest { private static final String HIGH_ID = "00000000000000008fffffffffffffff"; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdSpanAppenderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdSpanAppenderTest.java index df33cfee1..c065113b0 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdSpanAppenderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdSpanAppenderTest.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal; import static io.opentelemetry.rum.internal.RumConstants.SESSION_ID_KEY; - import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; @@ -25,7 +24,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.sdk.trace.ReadWriteSpan; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTest.java index 8cab48510..0fa2facaa 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTest.java @@ -29,16 +29,14 @@ import static org.mockito.Mockito.when; import io.opentelemetry.sdk.testing.time.TestClock; - +import java.util.concurrent.TimeUnit; +import java.util.regex.Pattern; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.concurrent.TimeUnit; -import java.util.regex.Pattern; - @ExtendWith(MockitoExtension.class) class SessionIdTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandlerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandlerTest.java index 71ca5d32f..e0265ca73 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandlerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SessionIdTimeoutHandlerTest.java @@ -20,11 +20,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import io.opentelemetry.sdk.testing.time.TestClock; - -import org.junit.jupiter.api.Test; - import java.time.Duration; import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.Test; class SessionIdTimeoutHandlerTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SpanDataModifierTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SpanDataModifierTest.java index 0a61ddfb7..3fec041b1 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SpanDataModifierTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/SpanDataModifierTest.java @@ -19,15 +19,13 @@ import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertSame; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import static java.util.Arrays.asList; -import static java.util.Collections.singletonList; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanKind; @@ -36,7 +34,9 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.sdk.trace.export.SpanExporter; - +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; @@ -44,10 +44,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - @ExtendWith(MockitoExtension.class) class SpanDataModifierTest { static final AttributeKey ATTRIBUTE = stringKey("attribute"); diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacksTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacksTest.java index de1cd32ed..4015ea71e 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacksTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityCallbacksTest.java @@ -19,7 +19,6 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.START_TYPE_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -28,21 +27,18 @@ import static org.mockito.Mockito.when; import android.app.Activity; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.EventData; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; +import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; -import java.util.Optional; - class ActivityCallbacksTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCacheTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCacheTest.java index 2d6bf5871..776be8946 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCacheTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerCacheTest.java @@ -24,16 +24,14 @@ import static org.mockito.Mockito.when; import android.app.Activity; - +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Function; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; - @ExtendWith(MockitoExtension.class) class ActivityTracerCacheTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerTest.java index 13e31ac32..30096f1d9 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/ActivityTracerTest.java @@ -19,26 +19,22 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.START_TYPE_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import android.app.Activity; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; import io.opentelemetry.rum.internal.util.ActiveSpan; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; - public class ActivityTracerTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityLifecycleCallbacksTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityLifecycleCallbacksTest.java index bc5edac9a..8a5207858 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityLifecycleCallbacksTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29ActivityLifecycleCallbacksTest.java @@ -19,7 +19,6 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.START_TYPE_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -28,21 +27,18 @@ import static org.mockito.Mockito.when; import android.app.Activity; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.EventData; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; +import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; -import java.util.Optional; - class Pre29ActivityLifecycleCallbacksTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); private ActivityTracerCache tracers; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBindingTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBindingTest.java index c37c6bd96..65a2ccea1 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBindingTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/Pre29VisibleScreenLifecycleBindingTest.java @@ -20,7 +20,6 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import android.app.Activity; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegistererTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegistererTest.java index b239f3b55..fa141703c 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegistererTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/RumFragmentActivityRegistererTest.java @@ -22,10 +22,8 @@ import android.app.Activity; import android.app.Application; - import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentManager; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBindingTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBindingTest.java index fb0063e01..d25864f53 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBindingTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenLifecycleBindingTest.java @@ -20,7 +20,6 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import android.app.Activity; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTrackerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTrackerTest.java index 96468d36b..efd3ff3ef 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTrackerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/activity/VisibleScreenTrackerTest.java @@ -21,11 +21,9 @@ import static org.mockito.Mockito.mock; import android.app.Activity; - import androidx.fragment.app.DialogFragment; import androidx.fragment.app.Fragment; import androidx.navigation.fragment.NavHostFragment; - import org.junit.jupiter.api.Test; class VisibleScreenTrackerTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTest.java index c30af0044..15c103a70 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTest.java @@ -18,25 +18,21 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor.constant; - import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.os.Looper; - import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; import io.opentelemetry.sdk.OpenTelemetrySdk; - +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - @ExtendWith(MockitoExtension.class) class AnrDetectorTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTogglerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTogglerTest.java index 0524d20b7..ee6210b64 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTogglerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrDetectorTogglerTest.java @@ -20,16 +20,15 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - @ExtendWith(MockitoExtension.class) class AnrDetectorTogglerTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcherTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcherTest.java index f3eb96e8a..3bf34b08a 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcherTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/AnrWatcherTest.java @@ -27,10 +27,8 @@ import static org.mockito.Mockito.when; import android.os.Handler; - import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.RegisterExtension; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/StackTraceFormatterTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/StackTraceFormatterTest.java index 288908da3..4cc9e5161 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/StackTraceFormatterTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/anr/StackTraceFormatterTest.java @@ -22,7 +22,6 @@ import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.context.Context; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - import org.junit.jupiter.api.Test; class StackTraceFormatterTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterTest.java index ff46caa75..130048f7d 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReporterTest.java @@ -18,7 +18,6 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor.constant; - import static org.awaitility.Awaitility.await; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -31,15 +30,13 @@ import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.time.Duration; +import java.util.function.Consumer; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.time.Duration; -import java.util.function.Consumer; - class CrashReporterTest { @RegisterExtension diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandlerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandlerTest.java index 157955220..46466db52 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandlerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/crash/CrashReportingExceptionHandlerTest.java @@ -26,15 +26,13 @@ import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.SdkTracerProvider; - +import java.util.concurrent.TimeUnit; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.concurrent.TimeUnit; - @ExtendWith(MockitoExtension.class) class CrashReportingExceptionHandlerTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentCallbackTestHarness.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentCallbackTestHarness.java index cc309f0a8..9101d2d31 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentCallbackTestHarness.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentCallbackTestHarness.java @@ -21,7 +21,6 @@ import android.content.Context; import android.os.Bundle; import android.view.View; - import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracerTest.java index 34f6d55e4..42dbf4231 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/FragmentTracerTest.java @@ -17,26 +17,22 @@ package io.opentelemetry.rum.internal.instrumentation.fragment; import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import androidx.fragment.app.Fragment; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.rum.internal.util.ActiveSpan; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; - class FragmentTracerTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); private Tracer tracer; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacksTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacksTest.java index 902a40e4c..536c37f98 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacksTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/RumFragmentLifecycleCallbacksTest.java @@ -18,7 +18,6 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.SCREEN_NAME_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; @@ -28,14 +27,14 @@ import static org.mockito.Mockito.when; import androidx.fragment.app.Fragment; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.EventData; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; +import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -43,9 +42,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.List; -import java.util.Optional; - @ExtendWith(MockitoExtension.class) class RumFragmentLifecycleCallbacksTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/ScreenNameExtractorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/ScreenNameExtractorTest.java index 408849905..e17b865a5 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/ScreenNameExtractorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/fragment/ScreenNameExtractorTest.java @@ -19,12 +19,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import android.app.Activity; - import androidx.fragment.app.Fragment; - import io.opentelemetry.rum.internal.instrumentation.RumScreenName; import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; - import org.junit.jupiter.api.Test; class ScreenNameExtractorTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinderTest.java index ef5012410..805b98a06 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CarrierFinderTest.java @@ -21,7 +21,6 @@ import static org.mockito.Mockito.when; import android.telephony.TelephonyManager; - import org.junit.jupiter.api.Test; class CarrierFinderTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractorTest.java index dd7f0b72a..9df8d8819 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkAttributesExtractorTest.java @@ -17,13 +17,10 @@ package io.opentelemetry.rum.internal.instrumentation.network; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.assertj.core.api.Assertions.entry; import android.os.Build; - import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProviderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProviderTest.java index 7c0629ef0..435b0c1ec 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProviderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/CurrentNetworkProviderTest.java @@ -32,15 +32,13 @@ import android.net.Network; import android.net.NetworkRequest; import android.os.Build; - +import java.util.concurrent.atomic.AtomicInteger; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import java.util.concurrent.atomic.AtomicInteger; - @RunWith(RobolectricTestRunner.class) @Config(maxSdk = Build.VERSION_CODES.S) public class CurrentNetworkProviderTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkAttributesSpanAppenderTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkAttributesSpanAppenderTest.java index def23fb59..4cb37f121 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkAttributesSpanAppenderTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkAttributesSpanAppenderTest.java @@ -25,7 +25,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.sdk.trace.ReadWriteSpan; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorTest.java index f670de19e..037176342 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkChangeMonitorTest.java @@ -18,21 +18,19 @@ import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.os.Build; - import io.opentelemetry.rum.internal.instrumentation.ApplicationStateListener; import io.opentelemetry.rum.internal.instrumentation.InstrumentedApplication; import io.opentelemetry.sdk.OpenTelemetrySdk; import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.util.List; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -45,8 +43,6 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import java.util.List; - @Config(sdk = Build.VERSION_CODES.P) @RunWith(RobolectricTestRunner.class) public class NetworkChangeMonitorTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkDetectorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkDetectorTest.java index e5fe846c1..28cb8b5f6 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkDetectorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/NetworkDetectorTest.java @@ -20,9 +20,7 @@ import android.content.Context; import android.os.Build; - import androidx.test.core.app.ApplicationProvider; - import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetectorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetectorTest.java index 010f8933f..c925f2fc7 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetectorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/PostApi28NetworkDetectorTest.java @@ -16,6 +16,7 @@ package io.opentelemetry.rum.internal.instrumentation.network; +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; @@ -27,7 +28,6 @@ import android.net.NetworkCapabilities; import android.os.Build; import android.telephony.TelephonyManager; - import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/SimpleNetworkDetectorTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/SimpleNetworkDetectorTest.java index 1cbbd2448..04a9c5419 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/SimpleNetworkDetectorTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/network/SimpleNetworkDetectorTest.java @@ -24,9 +24,7 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Build; - import androidx.test.core.app.ApplicationProvider; - import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListenerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListenerTest.java index e074c74a3..f229f6fa9 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListenerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/slowrendering/SlowRenderListenerTest.java @@ -18,9 +18,7 @@ import static android.view.FrameMetrics.DRAW_DURATION; import static android.view.FrameMetrics.FIRST_DRAW_FRAME; - import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -37,12 +35,16 @@ import android.os.Build; import android.os.Handler; import android.view.FrameMetrics; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.time.Duration; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -56,13 +58,6 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import java.time.Duration; -import java.util.List; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; -import java.util.stream.Stream; - @RunWith(RobolectricTestRunner.class) @Config(sdk = Build.VERSION_CODES.N) public class SlowRenderListenerTest { diff --git a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimerTest.java b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimerTest.java index 70a1a73b8..a6b8108d2 100644 --- a/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimerTest.java +++ b/opentelemetry-android-instrumentation/src/test/java/io/opentelemetry/rum/internal/instrumentation/startup/AppStartupTimerTest.java @@ -17,7 +17,6 @@ package io.opentelemetry.rum.internal.instrumentation.startup; import static io.opentelemetry.rum.internal.RumConstants.START_TYPE_KEY; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertSame; @@ -26,13 +25,11 @@ import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; - class AppStartupTimerTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); private Tracer tracer; diff --git a/sample-app/src/androidTest/java/com/splunk/android/sample/ExampleInstrumentedTest.java b/sample-app/src/androidTest/java/com/splunk/android/sample/ExampleInstrumentedTest.java index 6dc8eec6e..5a488c443 100644 --- a/sample-app/src/androidTest/java/com/splunk/android/sample/ExampleInstrumentedTest.java +++ b/sample-app/src/androidTest/java/com/splunk/android/sample/ExampleInstrumentedTest.java @@ -19,10 +19,8 @@ import static org.junit.Assert.*; import android.content.Context; - import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.platform.app.InstrumentationRegistry; - import org.junit.Test; import org.junit.runner.RunWith; diff --git a/sample-app/src/main/java/com/splunk/android/sample/DemoAnimatedView.java b/sample-app/src/main/java/com/splunk/android/sample/DemoAnimatedView.java index 1a290297f..9e302473a 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/DemoAnimatedView.java +++ b/sample-app/src/main/java/com/splunk/android/sample/DemoAnimatedView.java @@ -25,10 +25,8 @@ import android.graphics.Rect; import android.util.AttributeSet; import android.util.Log; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import java.security.SecureRandom; import java.util.Arrays; import java.util.List; diff --git a/sample-app/src/main/java/com/splunk/android/sample/FirstFragment.java b/sample-app/src/main/java/com/splunk/android/sample/FirstFragment.java index 75593efde..b6d4d0f29 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/FirstFragment.java +++ b/sample-app/src/main/java/com/splunk/android/sample/FirstFragment.java @@ -17,48 +17,40 @@ package com.splunk.android.sample; import static io.opentelemetry.api.common.AttributeKey.longKey; - import static org.apache.http.conn.ssl.SSLSocketFactory.SSL; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; - import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.navigation.fragment.NavHostFragment; - import com.splunk.android.sample.databinding.FragmentFirstBinding; import com.splunk.rum.SplunkRum; - import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.StatusCode; import io.opentelemetry.context.Scope; - -import okhttp3.Call; -import okhttp3.Callback; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.ResponseBody; - -import org.apache.http.conn.ssl.AllowAllHostnameVerifier; - import java.io.IOException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; - import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.ResponseBody; +import org.apache.http.conn.ssl.AllowAllHostnameVerifier; public class FirstFragment extends Fragment { @@ -232,6 +224,7 @@ public java.security.cert.X509Certificate[] getAcceptedIssuers() { } } }; + // Much like the comment above, you should NEVER do something like this in production, it // is an extremely bad practice. This is only present because the demo endpoint uses a // self-signed SSL cert. diff --git a/sample-app/src/main/java/com/splunk/android/sample/MailDialogFragment.java b/sample-app/src/main/java/com/splunk/android/sample/MailDialogFragment.java index 569e1a2ed..e457eb563 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/MailDialogFragment.java +++ b/sample-app/src/main/java/com/splunk/android/sample/MailDialogFragment.java @@ -21,12 +21,9 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; - import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.DialogFragment; - import com.splunk.rum.SplunkRum; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; diff --git a/sample-app/src/main/java/com/splunk/android/sample/MainActivity.java b/sample-app/src/main/java/com/splunk/android/sample/MainActivity.java index 496673544..8a965daff 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/MainActivity.java +++ b/sample-app/src/main/java/com/splunk/android/sample/MainActivity.java @@ -29,7 +29,6 @@ import android.util.Log; import android.view.Menu; import android.view.MenuItem; - import androidx.annotation.NonNull; import androidx.annotation.RequiresPermission; import androidx.appcompat.app.AppCompatActivity; @@ -39,13 +38,10 @@ import androidx.navigation.Navigation; import androidx.navigation.ui.AppBarConfiguration; import androidx.navigation.ui.NavigationUI; - import com.splunk.android.sample.databinding.ActivityMainBinding; import com.splunk.rum.RumScreenName; import com.splunk.rum.SplunkRum; - import io.opentelemetry.api.common.Attributes; - import java.util.Arrays; import java.util.concurrent.TimeUnit; diff --git a/sample-app/src/main/java/com/splunk/android/sample/SampleApplication.java b/sample-app/src/main/java/com/splunk/android/sample/SampleApplication.java index 579c36617..cb21dc851 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/SampleApplication.java +++ b/sample-app/src/main/java/com/splunk/android/sample/SampleApplication.java @@ -19,12 +19,9 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import android.app.Application; - import com.splunk.rum.SplunkRum; import com.splunk.rum.StandardAttributes; - import io.opentelemetry.api.common.Attributes; - import java.time.Duration; import java.util.regex.Pattern; diff --git a/sample-app/src/main/java/com/splunk/android/sample/SecondFragment.java b/sample-app/src/main/java/com/splunk/android/sample/SecondFragment.java index 544f4e430..9a8e57e2f 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/SecondFragment.java +++ b/sample-app/src/main/java/com/splunk/android/sample/SecondFragment.java @@ -21,18 +21,15 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; - import androidx.annotation.NonNull; import androidx.browser.customtabs.CustomTabsIntent; import androidx.fragment.app.Fragment; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.navigation.fragment.NavHostFragment; - import com.splunk.android.sample.databinding.FragmentSecondBinding; import com.splunk.rum.RumScreenName; import com.splunk.rum.SplunkRum; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.events.EventEmitter; import io.opentelemetry.api.events.EventEmitterProvider; @@ -41,7 +38,6 @@ import io.opentelemetry.context.Scope; import io.opentelemetry.sdk.OpenTelemetrySdk; import io.opentelemetry.sdk.logs.internal.SdkEventEmitterProvider; - import java.util.Random; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; diff --git a/sample-app/src/main/java/com/splunk/android/sample/ShopWebViewFragment.java b/sample-app/src/main/java/com/splunk/android/sample/ShopWebViewFragment.java index decb56e9b..a4e58f0ac 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/ShopWebViewFragment.java +++ b/sample-app/src/main/java/com/splunk/android/sample/ShopWebViewFragment.java @@ -23,12 +23,10 @@ import android.view.ViewGroup; import android.webkit.SslErrorHandler; import android.webkit.WebView; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.webkit.WebViewClientCompat; - import com.splunk.android.sample.databinding.FragmentWebViewBinding; import com.splunk.rum.SplunkRum; diff --git a/sample-app/src/main/java/com/splunk/android/sample/VolleyExample.java b/sample-app/src/main/java/com/splunk/android/sample/VolleyExample.java index 0f49084f5..f1f4ae505 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/VolleyExample.java +++ b/sample-app/src/main/java/com/splunk/android/sample/VolleyExample.java @@ -27,10 +27,8 @@ import com.android.volley.toolbox.HurlStack; import com.android.volley.toolbox.NoCache; import com.android.volley.toolbox.StringRequest; - import com.splunk.rum.SplunkRum; import com.splunk.rum.VolleyTracing; - import java.util.Arrays; import java.util.HashMap; import java.util.List; diff --git a/sample-app/src/main/java/com/splunk/android/sample/WebViewFragment.java b/sample-app/src/main/java/com/splunk/android/sample/WebViewFragment.java index 4f651ae44..f59730022 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/WebViewFragment.java +++ b/sample-app/src/main/java/com/splunk/android/sample/WebViewFragment.java @@ -26,16 +26,13 @@ import android.webkit.WebResourceResponse; import android.webkit.WebView; import android.widget.Toast; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.webkit.WebViewAssetLoader; import androidx.webkit.WebViewClientCompat; - import com.splunk.android.sample.databinding.FragmentWebViewBinding; import com.splunk.rum.SplunkRum; - import io.opentelemetry.api.common.Attributes; /** A simple {@link Fragment} subclass with a WebView in it. */ diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/RequestWrapper.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/RequestWrapper.java index dc96e14ce..c4dabb2ea 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/RequestWrapper.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/RequestWrapper.java @@ -17,7 +17,6 @@ package com.splunk.rum; import com.android.volley.Request; - import java.util.HashMap; import java.util.Map; diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/TracingHurlStack.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/TracingHurlStack.java index 9b15a5173..be7c6e66d 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/TracingHurlStack.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/TracingHurlStack.java @@ -20,14 +20,11 @@ import com.android.volley.Request; import com.android.volley.toolbox.HttpResponse; import com.android.volley.toolbox.HurlStack; - import io.opentelemetry.context.Context; import io.opentelemetry.context.Scope; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; - import java.io.IOException; import java.util.Map; - import javax.net.ssl.SSLSocketFactory; final class TracingHurlStack extends HurlStack { diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyHttpClientAttributesGetter.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyHttpClientAttributesGetter.java index 7f049f8d6..7b5f0f994 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyHttpClientAttributesGetter.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyHttpClientAttributesGetter.java @@ -19,14 +19,11 @@ import static java.util.Collections.emptyList; import androidx.annotation.Nullable; - import com.android.volley.AuthFailureError; import com.android.volley.Header; import com.android.volley.Request; import com.android.volley.toolbox.HttpResponse; - import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter; - import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyNetClientAttributesGetter.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyNetClientAttributesGetter.java index e2352ad65..f7375d24e 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyNetClientAttributesGetter.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyNetClientAttributesGetter.java @@ -17,9 +17,7 @@ package com.splunk.rum; import androidx.annotation.Nullable; - import com.android.volley.toolbox.HttpResponse; - import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyResponseAttributesExtractor.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyResponseAttributesExtractor.java index 560acbb6a..5266bc261 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyResponseAttributesExtractor.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyResponseAttributesExtractor.java @@ -21,10 +21,8 @@ import static com.splunk.rum.SplunkRum.LINK_TRACE_ID_KEY; import androidx.annotation.Nullable; - import com.android.volley.Header; import com.android.volley.toolbox.HttpResponse; - import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracing.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracing.java index f8d88b5ef..054a7c609 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracing.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracing.java @@ -18,10 +18,8 @@ import com.android.volley.toolbox.HttpResponse; import com.android.volley.toolbox.HurlStack; - import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; - import javax.net.ssl.SSLSocketFactory; /** Entrypoint for tracing Volley clients. */ diff --git a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracingBuilder.java b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracingBuilder.java index 3bd3cb065..a313310c4 100644 --- a/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracingBuilder.java +++ b/splunk-otel-android-volley/src/main/java/com/splunk/rum/VolleyTracingBuilder.java @@ -17,7 +17,6 @@ package com.splunk.rum; import com.android.volley.toolbox.HttpResponse; - import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter; @@ -27,7 +26,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesExtractorBuilder; import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor; import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanStatusExtractor; - import java.util.ArrayList; import java.util.List; diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TestRequestQueue.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TestRequestQueue.java index f5c9b929b..d7643b036 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TestRequestQueue.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TestRequestQueue.java @@ -24,7 +24,6 @@ import com.android.volley.toolbox.BasicNetwork; import com.android.volley.toolbox.HurlStack; import com.android.volley.toolbox.NoCache; - import java.util.concurrent.Executors; class TestRequestQueue { diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java index 81fcef148..9fe2a147f 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java @@ -17,18 +17,17 @@ package com.splunk.rum; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.assertj.core.api.Assertions.assertThatThrownBy; import com.android.volley.Request; import com.android.volley.toolbox.HurlStack; import com.android.volley.toolbox.RequestFuture; import com.android.volley.toolbox.StringRequest; - import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.util.List; +import java.util.concurrent.TimeUnit; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -36,9 +35,6 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; -import java.util.List; -import java.util.concurrent.TimeUnit; - @RunWith(RobolectricTestRunner.class) public class TracingHurlStackExceptionTest { diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java index 6b7345836..3ff70063d 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java @@ -27,24 +27,14 @@ import com.android.volley.toolbox.HurlStack; import com.android.volley.toolbox.RequestFuture; import com.android.volley.toolbox.StringRequest; - import com.google.mockwebserver.MockResponse; import com.google.mockwebserver.MockWebServer; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.robolectric.RobolectricTestRunner; - import java.io.IOException; import java.net.ServerSocket; import java.net.URL; @@ -55,6 +45,12 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; @RunWith(RobolectricTestRunner.class) public class TracingHurlStackTest { diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyHttpClientAttributesGetterTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyHttpClientAttributesGetterTest.java index 1027ca041..47be55590 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyHttpClientAttributesGetterTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyHttpClientAttributesGetterTest.java @@ -24,15 +24,13 @@ import com.android.volley.Header; import com.android.volley.Request; import com.android.volley.toolbox.HttpResponse; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.robolectric.RobolectricTestRunner; - import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; @RunWith(RobolectricTestRunner.class) public class VolleyHttpClientAttributesGetterTest { diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyResponseAttributesExtractorTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyResponseAttributesExtractorTest.java index 203a0ab91..71a41a6d3 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyResponseAttributesExtractorTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyResponseAttributesExtractorTest.java @@ -17,7 +17,6 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.COMPONENT_KEY; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.mockito.Mockito.mock; @@ -26,14 +25,11 @@ import com.android.volley.Header; import com.android.volley.Request; import com.android.volley.toolbox.HttpResponse; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; - -import org.junit.Test; - import java.util.Collections; import java.util.List; +import org.junit.Test; public class VolleyResponseAttributesExtractorTest { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/CrashComponentExtractor.java b/splunk-otel-android/src/main/java/com/splunk/rum/CrashComponentExtractor.java index d2ec0aab1..baf5d9cca 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/CrashComponentExtractor.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/CrashComponentExtractor.java @@ -22,7 +22,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; import io.opentelemetry.rum.internal.instrumentation.crash.CrashDetails; - import java.util.concurrent.atomic.AtomicBoolean; final class CrashComponentExtractor implements AttributesExtractor { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/CustomZipkinEncoder.java b/splunk-otel-android/src/main/java/com/splunk/rum/CustomZipkinEncoder.java index 3bbc1ee2c..40adb248e 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/CustomZipkinEncoder.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/CustomZipkinEncoder.java @@ -16,6 +16,8 @@ package com.splunk.rum; +import java.nio.charset.StandardCharsets; +import java.util.List; import zipkin2.Span; import zipkin2.codec.BytesEncoder; import zipkin2.codec.Encoding; @@ -23,9 +25,6 @@ import zipkin2.internal.V2SpanWriter; import zipkin2.internal.WriteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.List; - /** * We need a custom encoder to correct for the fact that the zipkin Span.Builder lowercases all Span * names. diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/DeviceSpanStorageLimiter.java b/splunk-otel-android/src/main/java/com/splunk/rum/DeviceSpanStorageLimiter.java index c6e25e8d4..1ff1f6cb4 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/DeviceSpanStorageLimiter.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/DeviceSpanStorageLimiter.java @@ -17,14 +17,11 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.LOG_TAG; - import static java.util.Comparator.comparingLong; import static java.util.Objects.requireNonNull; import android.util.Log; - import androidx.annotation.Nullable; - import java.io.File; import java.util.List; import java.util.stream.Collectors; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/DiskToZipkinExporter.java b/splunk-otel-android/src/main/java/com/splunk/rum/DiskToZipkinExporter.java index 0cb018b4d..9d5eb0cf4 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/DiskToZipkinExporter.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/DiskToZipkinExporter.java @@ -17,16 +17,12 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.LOG_TAG; - import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; import android.util.Log; - import androidx.annotation.Nullable; - import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetworkProvider; - import java.io.File; import java.util.Comparator; import java.util.List; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/FileSender.java b/splunk-otel-android/src/main/java/com/splunk/rum/FileSender.java index 2f5e84d50..1f2200df6 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/FileSender.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/FileSender.java @@ -17,17 +17,11 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.LOG_TAG; - import static java.util.Collections.emptyList; import static java.util.Objects.requireNonNull; import android.util.Log; - import androidx.annotation.Nullable; - -import zipkin2.Call; -import zipkin2.reporter.Sender; - import java.io.File; import java.io.IOException; import java.util.HashMap; @@ -35,6 +29,8 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; +import zipkin2.Call; +import zipkin2.reporter.Sender; class FileSender { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/FileUtils.java b/splunk-otel-android/src/main/java/com/splunk/rum/FileUtils.java index 05907b605..67efcee94 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/FileUtils.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/FileUtils.java @@ -24,7 +24,6 @@ import android.system.StructStat; import android.util.AtomicFile; import android.util.Log; - import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/InitializationEvents.java b/splunk-otel-android/src/main/java/com/splunk/rum/InitializationEvents.java index 89d853cc8..e3618c629 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/InitializationEvents.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/InitializationEvents.java @@ -23,7 +23,6 @@ import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.context.Context; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/LogToSpanBridge.java b/splunk-otel-android/src/main/java/com/splunk/rum/LogToSpanBridge.java index 002d71b4d..e269988ac 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/LogToSpanBridge.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/LogToSpanBridge.java @@ -33,7 +33,6 @@ import io.opentelemetry.sdk.logs.data.Body; import io.opentelemetry.sdk.logs.data.LogRecordData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - import java.util.concurrent.TimeUnit; final class LogToSpanBridge implements LogRecordProcessor { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/MemoryBufferingExporter.java b/splunk-otel-android/src/main/java/com/splunk/rum/MemoryBufferingExporter.java index 299730072..61d79f06c 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/MemoryBufferingExporter.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/MemoryBufferingExporter.java @@ -17,14 +17,11 @@ package com.splunk.rum; import android.util.Log; - import androidx.annotation.NonNull; - import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetworkProvider; import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/NoOpSplunkRum.java b/splunk-otel-android/src/main/java/com/splunk/rum/NoOpSplunkRum.java index 077da5cd0..74a971304 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/NoOpSplunkRum.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/NoOpSplunkRum.java @@ -17,18 +17,15 @@ package com.splunk.rum; import android.webkit.WebView; - import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.rum.internal.OpenTelemetryRum; - +import java.util.function.Consumer; import okhttp3.Call; import okhttp3.OkHttpClient; -import java.util.function.Consumer; - class NoOpSplunkRum extends SplunkRum { static final NoOpSplunkRum INSTANCE = new NoOpSplunkRum(); diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/RumInitializer.java b/splunk-otel-android/src/main/java/com/splunk/rum/RumInitializer.java index 6b59b4e9b..2a108b690 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/RumInitializer.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/RumInitializer.java @@ -22,22 +22,17 @@ import static com.splunk.rum.SplunkRum.COMPONENT_KEY; import static com.splunk.rum.SplunkRum.COMPONENT_UI; import static com.splunk.rum.SplunkRum.RUM_TRACER_NAME; - import static io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor.constant; import static io.opentelemetry.rum.internal.RumConstants.APP_START_SPAN_NAME; import static io.opentelemetry.rum.internal.RumConstants.RUM_SDK_VERSION; import static io.opentelemetry.semconv.resource.attributes.ResourceAttributes.DEPLOYMENT_ENVIRONMENT; - import static java.util.Objects.requireNonNull; import android.app.Application; import android.os.Looper; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; - import com.splunk.android.rum.R; - import io.opentelemetry.api.trace.Tracer; import io.opentelemetry.exporter.logging.LoggingSpanExporter; import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter; @@ -63,16 +58,14 @@ import io.opentelemetry.sdk.trace.export.BatchSpanProcessor; import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; import io.opentelemetry.sdk.trace.export.SpanExporter; - -import zipkin2.reporter.Sender; -import zipkin2.reporter.okhttp3.OkHttpSender; - import java.io.File; import java.time.Duration; import java.util.Collection; import java.util.function.Function; import java.util.function.Supplier; import java.util.logging.Level; +import zipkin2.reporter.Sender; +import zipkin2.reporter.okhttp3.OkHttpSender; class RumInitializer { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/RumResponseAttributesExtractor.java b/splunk-otel-android/src/main/java/com/splunk/rum/RumResponseAttributesExtractor.java index 5b54c7a5a..7f8cdef4a 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/RumResponseAttributesExtractor.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/RumResponseAttributesExtractor.java @@ -23,7 +23,6 @@ import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.context.Context; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; - import okhttp3.Request; import okhttp3.Response; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/RuntimeDetailsExtractor.java b/splunk-otel-android/src/main/java/com/splunk/rum/RuntimeDetailsExtractor.java index 135d365df..44cdca87a 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/RuntimeDetailsExtractor.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/RuntimeDetailsExtractor.java @@ -21,12 +21,9 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.BatteryManager; - import androidx.annotation.Nullable; - import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor; - import java.io.File; /** Represents details about the runtime environment at a time */ diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/ServerTimingHeaderParser.java b/splunk-otel-android/src/main/java/com/splunk/rum/ServerTimingHeaderParser.java index 59fb1659c..603beef15 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/ServerTimingHeaderParser.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/ServerTimingHeaderParser.java @@ -17,7 +17,6 @@ package com.splunk.rum; import androidx.annotation.Nullable; - import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SpanFilterBuilder.java b/splunk-otel-android/src/main/java/com/splunk/rum/SpanFilterBuilder.java index ef6bc4b1d..506446062 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SpanFilterBuilder.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SpanFilterBuilder.java @@ -18,7 +18,6 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.util.function.Function; import java.util.function.Predicate; @@ -27,6 +26,7 @@ public final class SpanFilterBuilder { private final io.opentelemetry.rum.internal.SpanFilterBuilder delegate = new io.opentelemetry.rum.internal.SpanFilterBuilder(); + /** * Remove matching spans from the exporter pipeline. * diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRum.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRum.java index db3c628f9..4664364d6 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRum.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRum.java @@ -26,9 +26,7 @@ import android.os.Looper; import android.util.Log; import android.webkit.WebView; - import androidx.annotation.Nullable; - import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; @@ -41,13 +39,11 @@ import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetworkProvider; import io.opentelemetry.rum.internal.instrumentation.startup.AppStartupTimer; import io.opentelemetry.sdk.OpenTelemetrySdk; - -import okhttp3.Call; -import okhttp3.OkHttpClient; - import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.function.Function; +import okhttp3.Call; +import okhttp3.OkHttpClient; /** Entrypoint for the Splunk OpenTelemetry Instrumentation for Android. */ public class SplunkRum { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRumBuilder.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRumBuilder.java index d2b1eae47..223a9e271 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRumBuilder.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkRumBuilder.java @@ -20,13 +20,10 @@ import android.app.Application; import android.util.Log; - import androidx.annotation.Nullable; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetworkProvider; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.time.Duration; import java.util.function.Consumer; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java index d9503c9ad..c9398c687 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java @@ -17,12 +17,9 @@ package com.splunk.rum; import android.app.Activity; - import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; - import io.opentelemetry.rum.internal.instrumentation.ScreenNameExtractor; - import java.util.function.Function; /** diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java index 7aaa78504..221aa9a5c 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java @@ -18,12 +18,10 @@ import static com.splunk.rum.SplunkRum.ERROR_MESSAGE_KEY; import static com.splunk.rum.SplunkRum.ERROR_TYPE_KEY; - import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.EXCEPTION_MESSAGE; import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.EXCEPTION_STACKTRACE; import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.EXCEPTION_TYPE; - import static java.util.Arrays.asList; import static java.util.Collections.unmodifiableSet; @@ -39,7 +37,6 @@ import io.opentelemetry.sdk.trace.export.SpanExporter; import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/ThrottlingExporter.java b/splunk-otel-android/src/main/java/com/splunk/rum/ThrottlingExporter.java index 00622f27f..3dfe836cb 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/ThrottlingExporter.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/ThrottlingExporter.java @@ -17,12 +17,10 @@ package com.splunk.rum; import android.util.Log; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SpanExporter; - import java.time.Duration; import java.util.ArrayDeque; import java.util.ArrayList; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinToDiskSender.java b/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinToDiskSender.java index 69540d156..ba7762752 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinToDiskSender.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinToDiskSender.java @@ -19,18 +19,14 @@ import static java.util.Objects.requireNonNull; import android.util.Log; - import androidx.annotation.Nullable; - import io.opentelemetry.sdk.common.Clock; - -import zipkin2.Call; -import zipkin2.codec.Encoding; -import zipkin2.reporter.Sender; - import java.io.File; import java.io.IOException; import java.util.List; +import zipkin2.Call; +import zipkin2.codec.Encoding; +import zipkin2.reporter.Sender; class ZipkinToDiskSender extends Sender { diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinWriteToDiskExporterFactory.java b/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinWriteToDiskExporterFactory.java index d6a90c64d..1a9c1f938 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinWriteToDiskExporterFactory.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/ZipkinWriteToDiskExporterFactory.java @@ -18,12 +18,9 @@ import android.app.Application; import android.util.Log; - import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter; - -import zipkin2.reporter.Sender; - import java.io.File; +import zipkin2.reporter.Sender; /** * Creates a ZipkinSpanExporter that is configured with an instance of a ZipkinToDiskSender that diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/BandwidthTrackerTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/BandwidthTrackerTest.java index ef753692b..6156480f1 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/BandwidthTrackerTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/BandwidthTrackerTest.java @@ -20,12 +20,11 @@ import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - import java.time.Clock; import java.util.Collections; import java.util.concurrent.atomic.AtomicLong; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; class BandwidthTrackerTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/CrashComponentExtractorTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/CrashComponentExtractorTest.java index 391b48024..7885e367b 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/CrashComponentExtractorTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/CrashComponentExtractorTest.java @@ -17,12 +17,10 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.COMPONENT_KEY; - import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; - import org.junit.jupiter.api.Test; class CrashComponentExtractorTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/CustomZipkinEncoderTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/CustomZipkinEncoderTest.java index 574d50b67..ffafa0999 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/CustomZipkinEncoderTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/CustomZipkinEncoderTest.java @@ -20,9 +20,7 @@ import io.opentelemetry.api.trace.SpanId; import io.opentelemetry.api.trace.TraceId; - import org.junit.jupiter.api.Test; - import zipkin2.Span; class CustomZipkinEncoderTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/DeviceSpanStorageLimiterTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/DeviceSpanStorageLimiterTest.java index 8e9b31ad4..bcf150f27 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/DeviceSpanStorageLimiterTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/DeviceSpanStorageLimiterTest.java @@ -24,15 +24,14 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.io.File; +import java.util.stream.Stream; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.io.File; -import java.util.stream.Stream; - @ExtendWith(MockitoExtension.class) class DeviceSpanStorageLimiterTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/DiskToZipkinExporterTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/DiskToZipkinExporterTest.java index 25fac56ea..f8cb4b222 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/DiskToZipkinExporterTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/DiskToZipkinExporterTest.java @@ -25,7 +25,8 @@ import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetwork; import io.opentelemetry.rum.internal.instrumentation.network.CurrentNetworkProvider; - +import java.io.File; +import java.util.stream.Stream; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -33,9 +34,6 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import java.io.File; -import java.util.stream.Stream; - @ExtendWith(MockitoExtension.class) class DiskToZipkinExporterTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/FileSenderTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/FileSenderTest.java index e59b976d8..a83499e5d 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/FileSenderTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/FileSenderTest.java @@ -16,6 +16,7 @@ package com.splunk.rum; +import static java.util.Collections.emptyList; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; @@ -24,25 +25,21 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static java.util.Collections.emptyList; - +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; - import zipkin2.Call; import zipkin2.reporter.Sender; -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.List; -import java.util.function.Consumer; - @ExtendWith(MockitoExtension.class) class FileSenderTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/LogToSpanBridgeTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/LogToSpanBridgeTest.java index 959354e6b..ebec61de9 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/LogToSpanBridgeTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/LogToSpanBridgeTest.java @@ -17,7 +17,6 @@ package com.splunk.rum; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.mockito.Mockito.when; import io.opentelemetry.api.common.Attributes; @@ -30,15 +29,13 @@ import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.RegisterExtension; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.List; - @ExtendWith(MockitoExtension.class) class LogToSpanBridgeTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/MemoryBufferingExporterTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/MemoryBufferingExporterTest.java index 99d32888b..e8ebd73ad 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/MemoryBufferingExporterTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/MemoryBufferingExporterTest.java @@ -31,16 +31,14 @@ import io.opentelemetry.sdk.common.CompletableResultCode; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SpanExporter; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; class MemoryBufferingExporterTest { private final CurrentNetworkProvider currentNetworkProvider = diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/NoOpSplunkRumTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/NoOpSplunkRumTest.java index b0323a0e6..9d7263d22 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/NoOpSplunkRumTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/NoOpSplunkRumTest.java @@ -22,12 +22,9 @@ import android.location.Location; import android.webkit.WebView; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; - import okhttp3.OkHttpClient; - import org.junit.jupiter.api.Test; class NoOpSplunkRumTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/RumInitializerTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/RumInitializerTest.java index f3c6f22fd..924f1afd1 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/RumInitializerTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/RumInitializerTest.java @@ -17,9 +17,10 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.COMPONENT_KEY; - import static io.opentelemetry.api.common.AttributeKey.stringKey; - +import static java.util.Collections.emptyList; +import static java.util.concurrent.TimeUnit.MILLISECONDS; +import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -27,16 +28,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static java.util.Collections.emptyList; -import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.MINUTES; - import android.app.Application; import android.content.Context; import android.os.Looper; - import com.google.common.base.Strings; - import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanKind; @@ -51,15 +46,13 @@ import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.sdk.trace.export.SpanExporter; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.util.ArrayList; +import java.util.List; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.ArrayList; -import java.util.List; - @ExtendWith(MockitoExtension.class) class RumInitializerTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/RumResponseAttributesExtractorTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/RumResponseAttributesExtractorTest.java index e67d40ee4..1ca693b2e 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/RumResponseAttributesExtractorTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/RumResponseAttributesExtractorTest.java @@ -19,9 +19,7 @@ import static com.splunk.rum.SplunkRum.COMPONENT_KEY; import static com.splunk.rum.SplunkRum.LINK_SPAN_ID_KEY; import static com.splunk.rum.SplunkRum.LINK_TRACE_ID_KEY; - import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.assertj.core.api.Assertions.entry; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -29,11 +27,9 @@ import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.context.Context; - import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; - import org.junit.jupiter.api.Test; class RumResponseAttributesExtractorTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/RuntimeDetailsExtractorTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/RuntimeDetailsExtractorTest.java index a6ba470da..3414fbc09 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/RuntimeDetailsExtractorTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/RuntimeDetailsExtractorTest.java @@ -18,23 +18,19 @@ import static io.opentelemetry.context.Context.root; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.mockito.Mockito.when; import android.content.Context; import android.content.Intent; import android.os.BatteryManager; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; - +import java.io.File; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.io.File; - @ExtendWith(MockitoExtension.class) class RuntimeDetailsExtractorTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/ScreenAttributesAppenderTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/ScreenAttributesAppenderTest.java index f6094c99b..20c0ac651 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/ScreenAttributesAppenderTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/ScreenAttributesAppenderTest.java @@ -18,7 +18,6 @@ import static io.opentelemetry.rum.internal.RumConstants.LAST_SCREEN_NAME_KEY; import static io.opentelemetry.rum.internal.RumConstants.SCREEN_NAME_KEY; - import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; @@ -31,7 +30,6 @@ import io.opentelemetry.context.Context; import io.opentelemetry.rum.internal.instrumentation.activity.VisibleScreenTracker; import io.opentelemetry.sdk.trace.ReadWriteSpan; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumBuilderTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumBuilderTest.java index c31fcea63..4a50abaf2 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumBuilderTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumBuilderTest.java @@ -24,9 +24,7 @@ import static org.mockito.Mockito.mock; import android.app.Application; - import io.opentelemetry.api.common.Attributes; - import org.junit.jupiter.api.Test; class SplunkRumBuilderTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumTest.java index 887d8b272..3000572c7 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkRumTest.java @@ -17,11 +17,9 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.COMPONENT_KEY; - import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; - import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertSame; @@ -39,7 +37,6 @@ import android.content.Context; import android.location.Location; import android.webkit.WebView; - import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; import io.opentelemetry.api.trace.Span; @@ -55,7 +52,10 @@ import io.opentelemetry.sdk.trace.SdkTracerProvider; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; - +import java.io.File; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -63,11 +63,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.io.File; -import java.util.List; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Consumer; - @ExtendWith(MockitoExtension.class) public class SplunkRumTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkSpanDataModifierTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkSpanDataModifierTest.java index 413f5cdce..9068f1064 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/SplunkSpanDataModifierTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/SplunkSpanDataModifierTest.java @@ -19,15 +19,12 @@ import static com.splunk.rum.SplunkSpanDataModifier.REACT_NATIVE_SPAN_ID_KEY; import static com.splunk.rum.SplunkSpanDataModifier.REACT_NATIVE_TRACE_ID_KEY; import static com.splunk.rum.SplunkSpanDataModifier.SPLUNK_OPERATION_KEY; - import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; - -import static org.mockito.Mockito.when; - import static java.util.Collections.singleton; import static java.util.Collections.singletonList; +import static org.mockito.Mockito.when; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanContext; @@ -44,7 +41,8 @@ import io.opentelemetry.sdk.trace.export.SpanExporter; import io.opentelemetry.semconv.resource.attributes.ResourceAttributes; import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; - +import java.util.Arrays; +import java.util.Collection; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; @@ -52,9 +50,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import java.util.Arrays; -import java.util.Collection; - @ExtendWith(MockitoExtension.class) class SplunkSpanDataModifierTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/ThrottlingExporterTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/ThrottlingExporterTest.java index 8e6c9f5b9..953eb092c 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/ThrottlingExporterTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/ThrottlingExporterTest.java @@ -17,10 +17,8 @@ package com.splunk.rum; import static com.splunk.rum.SplunkRum.COMPONENT_KEY; - -import static org.mockito.Mockito.verify; - import static java.util.Arrays.asList; +import static org.mockito.Mockito.verify; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.trace.SpanKind; @@ -28,17 +26,15 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.sdk.trace.export.SpanExporter; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; - import java.time.Duration; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.List; import java.util.concurrent.TimeUnit; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) class ThrottlingExporterTest { diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/WorkflowTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/WorkflowTest.java index ab075f897..eed355f60 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/WorkflowTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/WorkflowTest.java @@ -24,13 +24,11 @@ import io.opentelemetry.context.Scope; import io.opentelemetry.sdk.testing.junit5.OpenTelemetryExtension; import io.opentelemetry.sdk.trace.data.SpanData; - +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; -import java.util.List; - class WorkflowTest { @RegisterExtension final OpenTelemetryExtension otelTesting = OpenTelemetryExtension.create(); diff --git a/splunk-otel-android/src/test/java/com/splunk/rum/ZipkinToDiskSenderTest.java b/splunk-otel-android/src/test/java/com/splunk/rum/ZipkinToDiskSenderTest.java index 6c75a8b5b..edb2971a7 100644 --- a/splunk-otel-android/src/test/java/com/splunk/rum/ZipkinToDiskSenderTest.java +++ b/splunk-otel-android/src/test/java/com/splunk/rum/ZipkinToDiskSenderTest.java @@ -16,6 +16,7 @@ package com.splunk.rum; +import static java.util.Collections.emptyList; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.verify; @@ -23,10 +24,12 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; -import static java.util.Collections.emptyList; - import io.opentelemetry.sdk.common.Clock; - +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -34,12 +37,6 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.List; - @ExtendWith(MockitoExtension.class) class ZipkinToDiskSenderTest {