From d6e8529a80124fa465b172f93a6f55de75efef7c Mon Sep 17 00:00:00 2001 From: Alberto Geniola Date: Sun, 4 Jul 2021 22:40:37 +0200 Subject: [PATCH] Optimized imports Fixed compilation error --- .../com/albertogeniola/merosslib/MerossDeviceAp.java | 3 +++ .../com/albertogeniola/merosslib/MerossHttpClient.java | 10 +++------- .../merosslib/model/http/ApiCredentials.java | 8 +------- .../merosslib/model/http/ApiResponse.java | 2 -- .../protocol/payloads/GetConfigWifiListEntry.java | 1 - 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/merosslib/src/main/java/com/albertogeniola/merosslib/MerossDeviceAp.java b/merosslib/src/main/java/com/albertogeniola/merosslib/MerossDeviceAp.java index 906a20d..df93f0b 100644 --- a/merosslib/src/main/java/com/albertogeniola/merosslib/MerossDeviceAp.java +++ b/merosslib/src/main/java/com/albertogeniola/merosslib/MerossDeviceAp.java @@ -16,10 +16,13 @@ import com.squareup.okhttp.Request; import com.squareup.okhttp.RequestBody; import com.squareup.okhttp.Response; + import java.io.IOException; import java.io.Serializable; import java.util.concurrent.TimeUnit; + import javax.net.SocketFactory; + import lombok.Getter; diff --git a/merosslib/src/main/java/com/albertogeniola/merosslib/MerossHttpClient.java b/merosslib/src/main/java/com/albertogeniola/merosslib/MerossHttpClient.java index 698686b..bf0e5f6 100644 --- a/merosslib/src/main/java/com/albertogeniola/merosslib/MerossHttpClient.java +++ b/merosslib/src/main/java/com/albertogeniola/merosslib/MerossHttpClient.java @@ -9,7 +9,6 @@ import com.albertogeniola.merosslib.model.http.exceptions.HttpApiInvalidCredentialsException; import com.albertogeniola.merosslib.model.http.exceptions.HttpApiTokenException; import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.squareup.okhttp.MediaType; import com.squareup.okhttp.OkHttpClient; @@ -28,18 +27,15 @@ import java.util.Date; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Random; import java.util.concurrent.TimeUnit; - -import jdk.nashorn.internal.parser.TokenType; -import lombok.NonNull; -import lombok.SneakyThrows; - import java.util.logging.Logger; import javax.net.SocketFactory; +import lombok.NonNull; +import lombok.SneakyThrows; + public class MerossHttpClient implements Serializable { // Static attributes diff --git a/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiCredentials.java b/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiCredentials.java index 3e72aba..e95f874 100644 --- a/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiCredentials.java +++ b/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiCredentials.java @@ -2,30 +2,24 @@ import java.util.Date; -import jdk.internal.jline.internal.Nullable; -import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NonNull; @Getter public class ApiCredentials { - @Nullable private String apiServer; - @Nullable private String token; @NonNull private final String userId; - @Nullable private String userEmail; @NonNull private final String key; - @Nullable private Date issuedOn; public ApiCredentials(String userId, String key) { @@ -33,7 +27,7 @@ public ApiCredentials(String userId, String key) { this.key = key; } - public ApiCredentials(@Nullable String apiServer, @Nullable String token, @NonNull String userId, @Nullable String userEmail, @NonNull String key, @Nullable Date issuedOn) { + public ApiCredentials(String apiServer, String token, @NonNull String userId, String userEmail, @NonNull String key, Date issuedOn) { this.apiServer = apiServer; this.token = token; this.userId = userId; diff --git a/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiResponse.java b/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiResponse.java index 4b271f7..0855368 100644 --- a/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiResponse.java +++ b/merosslib/src/main/java/com/albertogeniola/merosslib/model/http/ApiResponse.java @@ -2,8 +2,6 @@ import com.google.gson.annotations.SerializedName; -import java.util.Map; - import lombok.Getter; @Getter diff --git a/merosslib/src/main/java/com/albertogeniola/merosslib/model/protocol/payloads/GetConfigWifiListEntry.java b/merosslib/src/main/java/com/albertogeniola/merosslib/model/protocol/payloads/GetConfigWifiListEntry.java index 0ebce38..206c5e5 100644 --- a/merosslib/src/main/java/com/albertogeniola/merosslib/model/protocol/payloads/GetConfigWifiListEntry.java +++ b/merosslib/src/main/java/com/albertogeniola/merosslib/model/protocol/payloads/GetConfigWifiListEntry.java @@ -9,7 +9,6 @@ import java.io.UnsupportedEncodingException; import lombok.Getter; -import lombok.Setter; @Getter public class GetConfigWifiListEntry {