From 4d7865849a18adbd8c403393872134b0b3730d2b Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 11 Dec 2013 17:29:36 -0800 Subject: [PATCH] Enforce no unused imports via Checkstyle Removed with: mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done --- .../googlecomputeengine/GoogleComputeEngineApiMetadata.java | 1 - .../config/GoogleComputeEngineHttpApiModule.java | 1 - .../googlecomputeengine/features/KernelApiLiveTest.java | 2 +- .../internal/BaseGoogleComputeEngineApiLiveTest.java | 3 ++- .../jclouds/googlecomputeengine/parse/ParseImageListTest.java | 2 +- .../parse/ParseInstanceSerialOutputTest.java | 2 +- .../googlecomputeengine/parse/ParseKernelListTest.java | 4 +++- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadata.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadata.java index f2281c7d8f..564f869f3d 100644 --- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadata.java +++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApiMetadata.java @@ -28,7 +28,6 @@ import static org.jclouds.reflect.Reflection2.typeToken; import java.net.URI; import java.util.Properties; -import org.jclouds.apis.ApiMetadata; import org.jclouds.compute.ComputeServiceContext; import org.jclouds.googlecomputeengine.compute.config.GoogleComputeEngineServiceContextModule; import org.jclouds.googlecomputeengine.config.GoogleComputeEngineHttpApiModule; diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineHttpApiModule.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineHttpApiModule.java index 10e68e6d31..c2de92899f 100644 --- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineHttpApiModule.java +++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineHttpApiModule.java @@ -16,7 +16,6 @@ */ package org.jclouds.googlecomputeengine.config; -import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Suppliers.compose; import static com.google.inject.name.Names.named; import static org.jclouds.Constants.PROPERTY_SESSION_INTERVAL; diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/KernelApiLiveTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/KernelApiLiveTest.java index 8e9f97154f..53eaed2e21 100644 --- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/KernelApiLiveTest.java +++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/KernelApiLiveTest.java @@ -74,4 +74,4 @@ public class KernelApiLiveTest extends BaseGoogleComputeEngineApiLiveTest { assertEquals(result.getName(), expected.getName()); } -} \ No newline at end of file +} diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineApiLiveTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineApiLiveTest.java index 53677cf281..383506f122 100644 --- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineApiLiveTest.java +++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/BaseGoogleComputeEngineApiLiveTest.java @@ -32,6 +32,7 @@ import org.jclouds.googlecomputeengine.domain.Operation; import com.google.common.base.Predicate; import com.google.common.base.Supplier; +import com.google.common.util.concurrent.Atomics; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; @@ -154,7 +155,7 @@ public class BaseGoogleComputeEngineApiLiveTest extends BaseApiLiveTest> operationDonePredicate, Operation operation, long maxWaitSeconds) { - AtomicReference operationReference = new AtomicReference(operation); + AtomicReference operationReference = Atomics.newReference(operation); retry(operationDonePredicate, maxWaitSeconds, 1, SECONDS).apply(operationReference); return operationReference.get(); } diff --git a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageListTest.java b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageListTest.java index 256d1afa62..80581bcff1 100644 --- a/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageListTest.java +++ b/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseImageListTest.java @@ -73,4 +73,4 @@ public class ParseImageListTest extends BaseGoogleComputeEngineParseTest