diff --git a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java index b89a862b4..3b51033aa 100644 --- a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java +++ b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java @@ -1,6 +1,5 @@ package cc.arduino.utils.network; -import com.sun.istack.internal.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import processing.app.PreferencesData; @@ -26,7 +25,7 @@ public class FileDownloaderCache { private String eTag; // BaseNoGui.getSettingsFolder() - public FileDownloaderCache(@NotNull String cacheFolder, @NotNull URL remoteURL) { + public FileDownloaderCache(String cacheFolder, URL remoteURL) { this.remoteURL = remoteURL; String[] splitPath = remoteURL.getPath().split("/"); if (splitPath.length > 0) { diff --git a/arduino-core/src/cc/arduino/utils/network/HttpConnectionManager.java b/arduino-core/src/cc/arduino/utils/network/HttpConnectionManager.java index 39a72bb64..ad75c1bfa 100644 --- a/arduino-core/src/cc/arduino/utils/network/HttpConnectionManager.java +++ b/arduino-core/src/cc/arduino/utils/network/HttpConnectionManager.java @@ -1,7 +1,6 @@ package cc.arduino.utils.network; import cc.arduino.net.CustomProxySelector; -import com.sun.istack.internal.NotNull; import org.apache.commons.codec.binary.Base64; import org.apache.commons.httpclient.CircularRedirectException; import org.apache.commons.lang3.StringUtils; @@ -50,7 +49,7 @@ public class HttpConnectionManager { } - public HttpURLConnection makeConnection(@NotNull Consumer beforeConnection) + public HttpURLConnection makeConnection(Consumer beforeConnection) throws IOException, NoSuchMethodException, ScriptException, URISyntaxException { return makeConnection(this.requestURL, 0, beforeConnection); } @@ -61,8 +60,8 @@ public class HttpConnectionManager { return makeConnection(this.requestURL, 0, (c) -> {}); } - private HttpURLConnection makeConnection(@NotNull URL requestURL, int movedTimes, - @NotNull Consumer beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException { + private HttpURLConnection makeConnection(URL requestURL, int movedTimes, + Consumer beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException { log.info("Prepare http request to " + requestURL); if (movedTimes > 3) { log.warn("Too many redirect " + requestURL);