diff --git a/src/main/java/com/google/maps/DirectionsApiRequest.java b/src/main/java/com/google/maps/DirectionsApiRequest.java index 47153e50d..ad746683c 100644 --- a/src/main/java/com/google/maps/DirectionsApiRequest.java +++ b/src/main/java/com/google/maps/DirectionsApiRequest.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.maps.model.DirectionsResult; import com.google.maps.model.LatLng; import com.google.maps.model.TrafficModel; @@ -24,8 +26,6 @@ import com.google.maps.model.Unit; import org.joda.time.ReadableInstant; -import static com.google.maps.internal.StringJoin.join; - /** Request for the Directions API. */ public class DirectionsApiRequest extends PendingResultBase { diff --git a/src/main/java/com/google/maps/DistanceMatrixApiRequest.java b/src/main/java/com/google/maps/DistanceMatrixApiRequest.java index 452575725..370712613 100644 --- a/src/main/java/com/google/maps/DistanceMatrixApiRequest.java +++ b/src/main/java/com/google/maps/DistanceMatrixApiRequest.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.maps.DirectionsApi.RouteRestriction; import com.google.maps.DistanceMatrixApi.Response; import com.google.maps.model.DistanceMatrix; @@ -26,8 +28,6 @@ import com.google.maps.model.Unit; import org.joda.time.ReadableInstant; -import static com.google.maps.internal.StringJoin.join; - /** A request to the Distance Matrix API. */ public class DistanceMatrixApiRequest extends PendingResultBase { diff --git a/src/main/java/com/google/maps/ElevationApi.java b/src/main/java/com/google/maps/ElevationApi.java index d83053dba..d1d626b41 100644 --- a/src/main/java/com/google/maps/ElevationApi.java +++ b/src/main/java/com/google/maps/ElevationApi.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.maps.errors.ApiException; import com.google.maps.internal.ApiConfig; import com.google.maps.internal.ApiResponse; @@ -23,8 +25,6 @@ import com.google.maps.model.EncodedPolyline; import com.google.maps.model.LatLng; -import static com.google.maps.internal.StringJoin.join; - /** * The Google Elevation API provides you a simple interface to query locations on the earth for * elevation data. Additionally, you may request sampled elevation data along paths, allowing you to diff --git a/src/main/java/com/google/maps/GaeRequestHandler.java b/src/main/java/com/google/maps/GaeRequestHandler.java index 1e16d2f18..de58d7fce 100644 --- a/src/main/java/com/google/maps/GaeRequestHandler.java +++ b/src/main/java/com/google/maps/GaeRequestHandler.java @@ -25,13 +25,12 @@ import com.google.maps.internal.ApiResponse; import com.google.maps.internal.ExceptionsAllowedToRetry; import com.google.maps.internal.GaePendingResult; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.net.MalformedURLException; import java.net.Proxy; import java.net.URL; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A strategy for handling URL requests using Google App Engine's URL Fetch API. diff --git a/src/main/java/com/google/maps/GeoApiContext.java b/src/main/java/com/google/maps/GeoApiContext.java index b9855edb8..20fe6fa73 100644 --- a/src/main/java/com/google/maps/GeoApiContext.java +++ b/src/main/java/com/google/maps/GeoApiContext.java @@ -22,9 +22,6 @@ import com.google.maps.internal.ApiResponse; import com.google.maps.internal.ExceptionsAllowedToRetry; import com.google.maps.internal.UrlSigner; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.UnsupportedEncodingException; import java.net.Proxy; import java.net.URLEncoder; @@ -32,6 +29,8 @@ import java.security.NoSuchAlgorithmException; import java.util.Map; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** The entry point for making requests against the Google Geo APIs. */ public class GeoApiContext { diff --git a/src/main/java/com/google/maps/GeocodingApiRequest.java b/src/main/java/com/google/maps/GeocodingApiRequest.java index d702e8e3b..fea17cb5c 100644 --- a/src/main/java/com/google/maps/GeocodingApiRequest.java +++ b/src/main/java/com/google/maps/GeocodingApiRequest.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.maps.internal.ApiConfig; import com.google.maps.model.AddressType; import com.google.maps.model.ComponentFilter; @@ -22,8 +24,6 @@ import com.google.maps.model.LatLng; import com.google.maps.model.LocationType; -import static com.google.maps.internal.StringJoin.join; - /** Request for the Geocoding API. */ public class GeocodingApiRequest extends PendingResultBase { diff --git a/src/main/java/com/google/maps/GeolocationApi.java b/src/main/java/com/google/maps/GeolocationApi.java index 1e9e11bdd..96be5314a 100644 --- a/src/main/java/com/google/maps/GeolocationApi.java +++ b/src/main/java/com/google/maps/GeolocationApi.java @@ -22,7 +22,6 @@ import com.google.maps.model.GeolocationPayload; import com.google.maps.model.GeolocationResult; import com.google.maps.model.LatLng; - import java.util.logging.Logger; /* diff --git a/src/main/java/com/google/maps/NearbySearchRequest.java b/src/main/java/com/google/maps/NearbySearchRequest.java index 8f18019a3..d50d1c3fe 100644 --- a/src/main/java/com/google/maps/NearbySearchRequest.java +++ b/src/main/java/com/google/maps/NearbySearchRequest.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.gson.FieldNamingPolicy; import com.google.maps.errors.ApiException; import com.google.maps.internal.ApiConfig; @@ -26,8 +28,6 @@ import com.google.maps.model.PriceLevel; import com.google.maps.model.RankBy; -import static com.google.maps.internal.StringJoin.join; - /** * A Nearby * Search request. diff --git a/src/main/java/com/google/maps/OkHttpRequestHandler.java b/src/main/java/com/google/maps/OkHttpRequestHandler.java index c7707b7f9..128f50a97 100644 --- a/src/main/java/com/google/maps/OkHttpRequestHandler.java +++ b/src/main/java/com/google/maps/OkHttpRequestHandler.java @@ -25,11 +25,10 @@ import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.RequestBody; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.net.Proxy; import java.util.concurrent.TimeUnit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A strategy for handling URL requests using OkHttp. diff --git a/src/main/java/com/google/maps/PendingResult.java b/src/main/java/com/google/maps/PendingResult.java index 66c61e35b..ac23797d4 100644 --- a/src/main/java/com/google/maps/PendingResult.java +++ b/src/main/java/com/google/maps/PendingResult.java @@ -16,7 +16,6 @@ package com.google.maps; import com.google.maps.errors.ApiException; - import java.io.IOException; /** diff --git a/src/main/java/com/google/maps/PendingResultBase.java b/src/main/java/com/google/maps/PendingResultBase.java index 7e00f1fa4..f7dc5b5fe 100644 --- a/src/main/java/com/google/maps/PendingResultBase.java +++ b/src/main/java/com/google/maps/PendingResultBase.java @@ -19,7 +19,6 @@ import com.google.maps.internal.ApiConfig; import com.google.maps.internal.ApiResponse; import com.google.maps.internal.StringJoin.UrlValue; - import java.io.IOException; import java.util.Collections; import java.util.HashMap; diff --git a/src/main/java/com/google/maps/PlaceAutocompleteRequest.java b/src/main/java/com/google/maps/PlaceAutocompleteRequest.java index a781305f6..f6d357f8f 100644 --- a/src/main/java/com/google/maps/PlaceAutocompleteRequest.java +++ b/src/main/java/com/google/maps/PlaceAutocompleteRequest.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.gson.FieldNamingPolicy; import com.google.maps.errors.ApiException; import com.google.maps.internal.ApiConfig; @@ -24,8 +26,6 @@ import com.google.maps.model.LatLng; import com.google.maps.model.PlaceAutocompleteType; -import static com.google.maps.internal.StringJoin.join; - /** * A Place diff --git a/src/main/java/com/google/maps/RoadsApi.java b/src/main/java/com/google/maps/RoadsApi.java index 80760a875..265f6eb6b 100644 --- a/src/main/java/com/google/maps/RoadsApi.java +++ b/src/main/java/com/google/maps/RoadsApi.java @@ -15,6 +15,8 @@ package com.google.maps; +import static com.google.maps.internal.StringJoin.join; + import com.google.gson.FieldNamingPolicy; import com.google.maps.errors.ApiError; import com.google.maps.errors.ApiException; @@ -25,8 +27,6 @@ import com.google.maps.model.SnappedSpeedLimitResponse; import com.google.maps.model.SpeedLimit; -import static com.google.maps.internal.StringJoin.join; - /** * The Google Maps Roads API identifies the roads a vehicle was traveling along and provides * additional metadata about those roads, such as speed limits. diff --git a/src/main/java/com/google/maps/TimeZoneApi.java b/src/main/java/com/google/maps/TimeZoneApi.java index f3052e20c..ef0cdd7c6 100644 --- a/src/main/java/com/google/maps/TimeZoneApi.java +++ b/src/main/java/com/google/maps/TimeZoneApi.java @@ -20,7 +20,6 @@ import com.google.maps.internal.ApiConfig; import com.google.maps.internal.ApiResponse; import com.google.maps.model.LatLng; - import java.util.TimeZone; /** diff --git a/src/main/java/com/google/maps/internal/DateTimeAdapter.java b/src/main/java/com/google/maps/internal/DateTimeAdapter.java index ee8447dde..76f856bfc 100644 --- a/src/main/java/com/google/maps/internal/DateTimeAdapter.java +++ b/src/main/java/com/google/maps/internal/DateTimeAdapter.java @@ -19,11 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; +import java.io.IOException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; -import java.io.IOException; - /** * This class handles conversion from JSON to {@link DateTime}s. * diff --git a/src/main/java/com/google/maps/internal/DayOfWeekAdaptor.java b/src/main/java/com/google/maps/internal/DayOfWeekAdaptor.java index 9bc32c0af..77441c553 100644 --- a/src/main/java/com/google/maps/internal/DayOfWeekAdaptor.java +++ b/src/main/java/com/google/maps/internal/DayOfWeekAdaptor.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.model.OpeningHours.Period.OpenClose.DayOfWeek; - import java.io.IOException; /** diff --git a/src/main/java/com/google/maps/internal/DistanceAdapter.java b/src/main/java/com/google/maps/internal/DistanceAdapter.java index 6bfbfe738..5b0f4289e 100644 --- a/src/main/java/com/google/maps/internal/DistanceAdapter.java +++ b/src/main/java/com/google/maps/internal/DistanceAdapter.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.model.Distance; - import java.io.IOException; /** diff --git a/src/main/java/com/google/maps/internal/DurationAdapter.java b/src/main/java/com/google/maps/internal/DurationAdapter.java index 82315d03a..4eedbd4bb 100644 --- a/src/main/java/com/google/maps/internal/DurationAdapter.java +++ b/src/main/java/com/google/maps/internal/DurationAdapter.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonWriter; import com.google.maps.model.Distance; import com.google.maps.model.Duration; - import java.io.IOException; /** diff --git a/src/main/java/com/google/maps/internal/EncodedPolylineInstanceCreator.java b/src/main/java/com/google/maps/internal/EncodedPolylineInstanceCreator.java index 8e1762409..fcec2492d 100644 --- a/src/main/java/com/google/maps/internal/EncodedPolylineInstanceCreator.java +++ b/src/main/java/com/google/maps/internal/EncodedPolylineInstanceCreator.java @@ -17,7 +17,6 @@ import com.google.gson.InstanceCreator; import com.google.maps.model.EncodedPolyline; - import java.lang.reflect.Type; public class EncodedPolylineInstanceCreator implements InstanceCreator { diff --git a/src/main/java/com/google/maps/internal/ExceptionsAllowedToRetry.java b/src/main/java/com/google/maps/internal/ExceptionsAllowedToRetry.java index b36b4752a..c489b3ebd 100644 --- a/src/main/java/com/google/maps/internal/ExceptionsAllowedToRetry.java +++ b/src/main/java/com/google/maps/internal/ExceptionsAllowedToRetry.java @@ -16,7 +16,6 @@ package com.google.maps.internal; import com.google.maps.errors.ApiException; - import java.util.HashSet; public final class ExceptionsAllowedToRetry extends HashSet> { diff --git a/src/main/java/com/google/maps/internal/FareAdapter.java b/src/main/java/com/google/maps/internal/FareAdapter.java index 4a8b176c9..116b1be51 100644 --- a/src/main/java/com/google/maps/internal/FareAdapter.java +++ b/src/main/java/com/google/maps/internal/FareAdapter.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.model.Fare; - import java.io.IOException; import java.math.BigDecimal; import java.util.Currency; diff --git a/src/main/java/com/google/maps/internal/GaePendingResult.java b/src/main/java/com/google/maps/internal/GaePendingResult.java index 27595c9ce..1c0b0b1d8 100644 --- a/src/main/java/com/google/maps/internal/GaePendingResult.java +++ b/src/main/java/com/google/maps/internal/GaePendingResult.java @@ -41,18 +41,17 @@ import com.google.maps.model.PlaceDetails.Review.AspectRating.RatingType; import com.google.maps.model.PriceLevel; import com.google.maps.model.TravelMode; -import org.joda.time.DateTime; -import org.joda.time.Instant; -import org.joda.time.LocalTime; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.IOException; import java.nio.charset.Charset; import java.util.Arrays; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; +import org.joda.time.DateTime; +import org.joda.time.Instant; +import org.joda.time.LocalTime; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A PendingResult backed by a HTTP call executed by Google App Engine URL Fetch capability, a diff --git a/src/main/java/com/google/maps/internal/GeolocationResponseAdapter.java b/src/main/java/com/google/maps/internal/GeolocationResponseAdapter.java index a9084fcb1..1d21903ec 100644 --- a/src/main/java/com/google/maps/internal/GeolocationResponseAdapter.java +++ b/src/main/java/com/google/maps/internal/GeolocationResponseAdapter.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.GeolocationApi; - import java.io.IOException; import java.util.logging.Logger; diff --git a/src/main/java/com/google/maps/internal/InstantAdapter.java b/src/main/java/com/google/maps/internal/InstantAdapter.java index ff498a7c3..ddd8d86f4 100644 --- a/src/main/java/com/google/maps/internal/InstantAdapter.java +++ b/src/main/java/com/google/maps/internal/InstantAdapter.java @@ -19,9 +19,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; -import org.joda.time.Instant; - import java.io.IOException; +import org.joda.time.Instant; /** This class handles conversion from JSON to {@link Instant}. */ public class InstantAdapter extends TypeAdapter { diff --git a/src/main/java/com/google/maps/internal/LatLngAdapter.java b/src/main/java/com/google/maps/internal/LatLngAdapter.java index c655ee3ff..10dd89081 100644 --- a/src/main/java/com/google/maps/internal/LatLngAdapter.java +++ b/src/main/java/com/google/maps/internal/LatLngAdapter.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.model.LatLng; - import java.io.IOException; /** Handle conversion from varying types of latitude and longitude representations. */ diff --git a/src/main/java/com/google/maps/internal/LocalTimeAdapter.java b/src/main/java/com/google/maps/internal/LocalTimeAdapter.java index 062eb2952..744a99040 100644 --- a/src/main/java/com/google/maps/internal/LocalTimeAdapter.java +++ b/src/main/java/com/google/maps/internal/LocalTimeAdapter.java @@ -19,12 +19,11 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; +import java.io.IOException; import org.joda.time.LocalTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; -import java.io.IOException; - /** This class handles conversion from JSON to {@link LocalTime}. */ public class LocalTimeAdapter extends TypeAdapter { /** Read a time from the Places API and convert to a {@link LocalTime} */ diff --git a/src/main/java/com/google/maps/internal/OkHttpPendingResult.java b/src/main/java/com/google/maps/internal/OkHttpPendingResult.java index 07c63670f..8251e9386 100644 --- a/src/main/java/com/google/maps/internal/OkHttpPendingResult.java +++ b/src/main/java/com/google/maps/internal/OkHttpPendingResult.java @@ -40,17 +40,16 @@ import com.squareup.okhttp.OkHttpClient; import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; -import org.joda.time.DateTime; -import org.joda.time.Instant; -import org.joda.time.LocalTime; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.IOException; import java.util.Arrays; import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; +import org.joda.time.DateTime; +import org.joda.time.Instant; +import org.joda.time.LocalTime; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A PendingResult backed by a HTTP call executed by OkHttp, a deserialization step using Gson, rate diff --git a/src/main/java/com/google/maps/internal/PolylineEncoding.java b/src/main/java/com/google/maps/internal/PolylineEncoding.java index f66afca97..d53308dd0 100644 --- a/src/main/java/com/google/maps/internal/PolylineEncoding.java +++ b/src/main/java/com/google/maps/internal/PolylineEncoding.java @@ -16,7 +16,6 @@ package com.google.maps.internal; import com.google.maps.model.LatLng; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/google/maps/internal/PriceLevelAdaptor.java b/src/main/java/com/google/maps/internal/PriceLevelAdaptor.java index 563221054..58476e148 100644 --- a/src/main/java/com/google/maps/internal/PriceLevelAdaptor.java +++ b/src/main/java/com/google/maps/internal/PriceLevelAdaptor.java @@ -20,7 +20,6 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import com.google.maps.model.PriceLevel; - import java.io.IOException; /** diff --git a/src/main/java/com/google/maps/internal/RateLimitExecutorService.java b/src/main/java/com/google/maps/internal/RateLimitExecutorService.java index a2cc04447..995c8212d 100644 --- a/src/main/java/com/google/maps/internal/RateLimitExecutorService.java +++ b/src/main/java/com/google/maps/internal/RateLimitExecutorService.java @@ -16,9 +16,6 @@ package com.google.maps.internal; import com.google.common.util.concurrent.RateLimiter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.util.Collection; import java.util.List; import java.util.concurrent.BlockingQueue; @@ -32,6 +29,8 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** Rate Limit Policy for Google Maps Web Services APIs. */ public class RateLimitExecutorService implements ExecutorService, Runnable { diff --git a/src/main/java/com/google/maps/internal/SafeEnumAdapter.java b/src/main/java/com/google/maps/internal/SafeEnumAdapter.java index 4de883d21..19ab6848c 100644 --- a/src/main/java/com/google/maps/internal/SafeEnumAdapter.java +++ b/src/main/java/com/google/maps/internal/SafeEnumAdapter.java @@ -19,11 +19,10 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.IOException; import java.util.Locale; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link com.google.gson.TypeAdapter} that maps case-insensitive values to an enum type. If the diff --git a/src/main/java/com/google/maps/internal/UrlSigner.java b/src/main/java/com/google/maps/internal/UrlSigner.java index c17d8fc49..cde206dcb 100644 --- a/src/main/java/com/google/maps/internal/UrlSigner.java +++ b/src/main/java/com/google/maps/internal/UrlSigner.java @@ -15,12 +15,11 @@ package com.google.maps.internal; -import okio.ByteString; - -import javax.crypto.Mac; -import javax.crypto.spec.SecretKeySpec; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import okio.ByteString; /** * Utility class for supporting Maps for Work Digital signatures. diff --git a/src/main/java/com/google/maps/model/ComponentFilter.java b/src/main/java/com/google/maps/model/ComponentFilter.java index e34ffb2ba..cb9e7c479 100644 --- a/src/main/java/com/google/maps/model/ComponentFilter.java +++ b/src/main/java/com/google/maps/model/ComponentFilter.java @@ -15,10 +15,10 @@ package com.google.maps.model; -import com.google.maps.internal.StringJoin; - import static com.google.maps.internal.StringJoin.join; +import com.google.maps.internal.StringJoin; + /** * This class represents a component filter for a geocode request. In a geocoding response, the * Google Geocoding API can return address results restricted to a specific area. The restriction is diff --git a/src/main/java/com/google/maps/model/EncodedPolyline.java b/src/main/java/com/google/maps/model/EncodedPolyline.java index d1c402a2c..7f3958b06 100644 --- a/src/main/java/com/google/maps/model/EncodedPolyline.java +++ b/src/main/java/com/google/maps/model/EncodedPolyline.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.PolylineEncoding; - import java.util.List; /** diff --git a/src/main/java/com/google/maps/model/LatLng.java b/src/main/java/com/google/maps/model/LatLng.java index 609d04b03..1ef1ec015 100644 --- a/src/main/java/com/google/maps/model/LatLng.java +++ b/src/main/java/com/google/maps/model/LatLng.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** A place on Earth, represented by a Latitude/Longitude pair. */ diff --git a/src/main/java/com/google/maps/model/PlaceDetails.java b/src/main/java/com/google/maps/model/PlaceDetails.java index db2e057e9..588b235d5 100644 --- a/src/main/java/com/google/maps/model/PlaceDetails.java +++ b/src/main/java/com/google/maps/model/PlaceDetails.java @@ -15,9 +15,8 @@ package com.google.maps.model; -import org.joda.time.Instant; - import java.net.URL; +import org.joda.time.Instant; /** * PlaceDetails is the result of a Place Details request. A Place Details request returns more diff --git a/src/main/java/com/google/maps/model/TrafficModel.java b/src/main/java/com/google/maps/model/TrafficModel.java index 958328dc0..0e9ecca3f 100644 --- a/src/main/java/com/google/maps/model/TrafficModel.java +++ b/src/main/java/com/google/maps/model/TrafficModel.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** Specifies traffic prediction model when request future directions. */ diff --git a/src/main/java/com/google/maps/model/TransitMode.java b/src/main/java/com/google/maps/model/TransitMode.java index dc454be86..d2f072f45 100644 --- a/src/main/java/com/google/maps/model/TransitMode.java +++ b/src/main/java/com/google/maps/model/TransitMode.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** You may specify transit mode when requesting transit directions or distances. */ diff --git a/src/main/java/com/google/maps/model/TransitRoutingPreference.java b/src/main/java/com/google/maps/model/TransitRoutingPreference.java index 0c4a571ef..bc56d4ea3 100644 --- a/src/main/java/com/google/maps/model/TransitRoutingPreference.java +++ b/src/main/java/com/google/maps/model/TransitRoutingPreference.java @@ -1,7 +1,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** Indicate user preference when requesting transit directions. */ diff --git a/src/main/java/com/google/maps/model/TravelMode.java b/src/main/java/com/google/maps/model/TravelMode.java index a01749cde..a07b7ca00 100644 --- a/src/main/java/com/google/maps/model/TravelMode.java +++ b/src/main/java/com/google/maps/model/TravelMode.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** diff --git a/src/main/java/com/google/maps/model/Unit.java b/src/main/java/com/google/maps/model/Unit.java index af077ecdc..fff60311d 100644 --- a/src/main/java/com/google/maps/model/Unit.java +++ b/src/main/java/com/google/maps/model/Unit.java @@ -16,7 +16,6 @@ package com.google.maps.model; import com.google.maps.internal.StringJoin.UrlValue; - import java.util.Locale; /** Units of measurement. */ diff --git a/src/test/java/com/google/maps/DirectionsApiTest.java b/src/test/java/com/google/maps/DirectionsApiTest.java index 5b6359387..49bb25492 100644 --- a/src/test/java/com/google/maps/DirectionsApiTest.java +++ b/src/test/java/com/google/maps/DirectionsApiTest.java @@ -15,6 +15,12 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; + import com.google.maps.DirectionsApi.RouteRestriction; import com.google.maps.errors.NotFoundException; import com.google.maps.model.AddressType; @@ -26,6 +32,8 @@ import com.google.maps.model.TransitRoutingPreference; import com.google.maps.model.TravelMode; import com.google.maps.model.Unit; +import java.util.ArrayList; +import java.util.List; import org.joda.time.DateTime; import org.joda.time.Duration; import org.joda.time.Instant; @@ -34,15 +42,6 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import java.util.ArrayList; -import java.util.List; - -import static com.google.maps.TestUtils.retrieveBody; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - @Category(MediumTests.class) public class DirectionsApiTest { diff --git a/src/test/java/com/google/maps/DistanceMatrixApiTest.java b/src/test/java/com/google/maps/DistanceMatrixApiTest.java index 74b1873c8..c3bce44bb 100644 --- a/src/test/java/com/google/maps/DistanceMatrixApiTest.java +++ b/src/test/java/com/google/maps/DistanceMatrixApiTest.java @@ -15,6 +15,9 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static org.junit.Assert.assertEquals; + import com.google.maps.DirectionsApi.RouteRestriction; import com.google.maps.model.DistanceMatrix; import com.google.maps.model.DistanceMatrixElementStatus; @@ -27,9 +30,6 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import static com.google.maps.TestUtils.retrieveBody; -import static org.junit.Assert.assertEquals; - @Category(MediumTests.class) public class DistanceMatrixApiTest { diff --git a/src/test/java/com/google/maps/ElevationApiTest.java b/src/test/java/com/google/maps/ElevationApiTest.java index a6d29f6f2..9270a9b3c 100644 --- a/src/test/java/com/google/maps/ElevationApiTest.java +++ b/src/test/java/com/google/maps/ElevationApiTest.java @@ -15,21 +15,20 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + import com.google.maps.errors.InvalidRequestException; import com.google.maps.errors.RequestDeniedException; import com.google.maps.model.ElevationResult; import com.google.maps.model.EncodedPolyline; import com.google.maps.model.LatLng; import com.google.maps.model.LatLngAssert; -import org.junit.Test; -import org.junit.experimental.categories.Category; - import java.util.Collections; import java.util.List; - -import static com.google.maps.TestUtils.retrieveBody; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import org.junit.Test; +import org.junit.experimental.categories.Category; @Category(MediumTests.class) public class ElevationApiTest { diff --git a/src/test/java/com/google/maps/GeoApiContextTest.java b/src/test/java/com/google/maps/GeoApiContextTest.java index 202005ec5..43843e159 100644 --- a/src/test/java/com/google/maps/GeoApiContextTest.java +++ b/src/test/java/com/google/maps/GeoApiContextTest.java @@ -15,6 +15,11 @@ package com.google.maps; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.mock; + import com.google.maps.errors.OverQueryLimitException; import com.google.maps.internal.ApiConfig; import com.google.maps.internal.ApiResponse; @@ -22,19 +27,13 @@ import com.google.mockwebserver.MockResponse; import com.google.mockwebserver.MockWebServer; import com.google.mockwebserver.RecordedRequest; -import org.junit.Test; -import org.junit.experimental.categories.Category; - import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.mock; +import org.junit.Test; +import org.junit.experimental.categories.Category; @Category(MediumTests.class) public class GeoApiContextTest { diff --git a/src/test/java/com/google/maps/GeocodingApiTest.java b/src/test/java/com/google/maps/GeocodingApiTest.java index 82eec035f..569c037a3 100644 --- a/src/test/java/com/google/maps/GeocodingApiTest.java +++ b/src/test/java/com/google/maps/GeocodingApiTest.java @@ -15,25 +15,24 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static com.google.maps.model.ComponentFilter.administrativeArea; +import static com.google.maps.model.ComponentFilter.country; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + import com.google.maps.model.AddressComponentType; import com.google.maps.model.AddressType; import com.google.maps.model.ComponentFilter; import com.google.maps.model.GeocodingResult; import com.google.maps.model.LatLng; import com.google.maps.model.LocationType; -import org.junit.Test; -import org.junit.experimental.categories.Category; - import java.util.ArrayList; import java.util.List; - -import static com.google.maps.TestUtils.retrieveBody; -import static com.google.maps.model.ComponentFilter.administrativeArea; -import static com.google.maps.model.ComponentFilter.country; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; +import org.junit.Test; +import org.junit.experimental.categories.Category; @Category(MediumTests.class) public class GeocodingApiTest { diff --git a/src/test/java/com/google/maps/GeolocationApiTest.java b/src/test/java/com/google/maps/GeolocationApiTest.java index df4a11500..20b47da47 100644 --- a/src/test/java/com/google/maps/GeolocationApiTest.java +++ b/src/test/java/com/google/maps/GeolocationApiTest.java @@ -15,6 +15,10 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + import com.google.maps.errors.InvalidRequestException; import com.google.maps.errors.NotFoundException; import com.google.maps.model.CellTower; @@ -26,10 +30,6 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import static com.google.maps.TestUtils.retrieveBody; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - @Category(LargeTests.class) public class GeolocationApiTest { diff --git a/src/test/java/com/google/maps/LocalTestServerContext.java b/src/test/java/com/google/maps/LocalTestServerContext.java index e665c1d49..bde4645a4 100644 --- a/src/test/java/com/google/maps/LocalTestServerContext.java +++ b/src/test/java/com/google/maps/LocalTestServerContext.java @@ -15,21 +15,20 @@ package com.google.maps; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + import com.google.mockwebserver.MockResponse; import com.google.mockwebserver.MockWebServer; import com.google.mockwebserver.RecordedRequest; -import org.apache.http.NameValuePair; -import org.apache.http.client.utils.URLEncodedUtils; -import org.json.JSONObject; - import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.nio.charset.Charset; import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.http.NameValuePair; +import org.apache.http.client.utils.URLEncodedUtils; +import org.json.JSONObject; /** Local test mock server for unit tests. */ public class LocalTestServerContext implements AutoCloseable { diff --git a/src/test/java/com/google/maps/PlacesApiTest.java b/src/test/java/com/google/maps/PlacesApiTest.java index ccec7c941..c965ffff0 100644 --- a/src/test/java/com/google/maps/PlacesApiTest.java +++ b/src/test/java/com/google/maps/PlacesApiTest.java @@ -15,6 +15,12 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import com.google.maps.model.AddressComponentType; import com.google.maps.model.AutocompletePrediction; import com.google.maps.model.ComponentFilter; @@ -31,19 +37,12 @@ import com.google.maps.model.PlacesSearchResult; import com.google.maps.model.PriceLevel; import com.google.maps.model.RankBy; +import java.net.URI; +import java.util.Arrays; import org.joda.time.LocalTime; import org.joda.time.format.DateTimeFormat; import org.junit.Test; -import java.net.URI; -import java.util.Arrays; - -import static com.google.maps.TestUtils.retrieveBody; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - public class PlacesApiTest { private static final String GOOGLE_SYDNEY = "ChIJN1t_tDeuEmsRUsoyG83frY4"; diff --git a/src/test/java/com/google/maps/RoadsApiIntegrationTest.java b/src/test/java/com/google/maps/RoadsApiIntegrationTest.java index cf0bb2614..8e7f9a4a4 100644 --- a/src/test/java/com/google/maps/RoadsApiIntegrationTest.java +++ b/src/test/java/com/google/maps/RoadsApiIntegrationTest.java @@ -15,6 +15,12 @@ package com.google.maps; +import static com.google.maps.TestUtils.retrieveBody; +import static com.google.maps.internal.StringJoin.join; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + import com.google.maps.model.LatLng; import com.google.maps.model.SnappedPoint; import com.google.maps.model.SnappedSpeedLimitResponse; @@ -22,12 +28,6 @@ import org.junit.Test; import org.junit.experimental.categories.Category; -import static com.google.maps.TestUtils.retrieveBody; -import static com.google.maps.internal.StringJoin.join; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - @Category(LargeTests.class) public class RoadsApiIntegrationTest { diff --git a/src/test/java/com/google/maps/TimeZoneApiTest.java b/src/test/java/com/google/maps/TimeZoneApiTest.java index de7a01e8f..9b0cd7353 100644 --- a/src/test/java/com/google/maps/TimeZoneApiTest.java +++ b/src/test/java/com/google/maps/TimeZoneApiTest.java @@ -15,19 +15,18 @@ package com.google.maps; -import com.google.maps.errors.ZeroResultsException; -import com.google.maps.model.LatLng; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import java.util.Date; -import java.util.TimeZone; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import com.google.maps.errors.ZeroResultsException; +import com.google.maps.model.LatLng; +import java.util.Date; +import java.util.TimeZone; +import org.junit.Test; +import org.junit.experimental.categories.Category; + @Category(MediumTests.class) public class TimeZoneApiTest { diff --git a/src/test/java/com/google/maps/internal/PolylineEncodingTest.java b/src/test/java/com/google/maps/internal/PolylineEncodingTest.java index 25632ba80..ea3cd7dc5 100644 --- a/src/test/java/com/google/maps/internal/PolylineEncodingTest.java +++ b/src/test/java/com/google/maps/internal/PolylineEncodingTest.java @@ -15,16 +15,15 @@ package com.google.maps.internal; +import static com.google.maps.model.LatLngAssert.assertEquals; +import static org.junit.Assert.assertEquals; + import com.google.maps.SmallTests; import com.google.maps.model.LatLng; +import java.util.List; import org.junit.Test; import org.junit.experimental.categories.Category; -import java.util.List; - -import static com.google.maps.model.LatLngAssert.assertEquals; -import static org.junit.Assert.assertEquals; - /** Test case for {@link PolylineEncoding}. */ @Category(SmallTests.class) public class PolylineEncodingTest { diff --git a/src/test/java/com/google/maps/internal/RateLimitExecutorServiceTest.java b/src/test/java/com/google/maps/internal/RateLimitExecutorServiceTest.java index 996ec1293..ccc1b21de 100644 --- a/src/test/java/com/google/maps/internal/RateLimitExecutorServiceTest.java +++ b/src/test/java/com/google/maps/internal/RateLimitExecutorServiceTest.java @@ -15,18 +15,17 @@ package com.google.maps.internal; -import com.google.maps.MediumTests; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import static org.junit.Assert.assertTrue; +import com.google.maps.MediumTests; import java.util.AbstractMap; import java.util.Date; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertTrue; +import org.junit.Test; +import org.junit.experimental.categories.Category; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Category(MediumTests.class) public class RateLimitExecutorServiceTest { diff --git a/src/test/java/com/google/maps/internal/UrlSignerTest.java b/src/test/java/com/google/maps/internal/UrlSignerTest.java index e18a362b7..c3f1c7959 100644 --- a/src/test/java/com/google/maps/internal/UrlSignerTest.java +++ b/src/test/java/com/google/maps/internal/UrlSignerTest.java @@ -15,20 +15,19 @@ package com.google.maps.internal; -import com.google.maps.SmallTests; -import okio.ByteString; -import org.junit.Test; -import org.junit.experimental.categories.Category; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import com.google.maps.SmallTests; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import okio.ByteString; +import org.junit.Test; +import org.junit.experimental.categories.Category; /** Test case for {@link UrlSigner}. */ @Category(SmallTests.class) diff --git a/src/test/java/com/google/maps/model/EnumsTest.java b/src/test/java/com/google/maps/model/EnumsTest.java index 74f4f204d..04599f311 100644 --- a/src/test/java/com/google/maps/model/EnumsTest.java +++ b/src/test/java/com/google/maps/model/EnumsTest.java @@ -15,18 +15,17 @@ package com.google.maps.model; -import com.google.maps.SmallTests; -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import java.util.HashMap; -import java.util.Map; - import static com.google.maps.internal.StringJoin.UrlValue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; +import com.google.maps.SmallTests; +import java.util.HashMap; +import java.util.Map; +import org.junit.Test; +import org.junit.experimental.categories.Category; + @Category(SmallTests.class) public class EnumsTest { @Test