1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-31 20:52:13 +01:00

Remove notNull annotation that failed the build

This commit is contained in:
Mattia Bertorello 2019-06-28 17:49:05 +02:00
parent d089323342
commit e6f09123bc
No known key found for this signature in database
GPG Key ID: CE1FB2BE91770F24
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,5 @@
package cc.arduino.utils.network; package cc.arduino.utils.network;
import com.sun.istack.internal.NotNull;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import processing.app.PreferencesData; import processing.app.PreferencesData;
@ -26,7 +25,7 @@ public class FileDownloaderCache {
private String eTag; private String eTag;
// BaseNoGui.getSettingsFolder() // BaseNoGui.getSettingsFolder()
public FileDownloaderCache(@NotNull String cacheFolder, @NotNull URL remoteURL) { public FileDownloaderCache(String cacheFolder, URL remoteURL) {
this.remoteURL = remoteURL; this.remoteURL = remoteURL;
String[] splitPath = remoteURL.getPath().split("/"); String[] splitPath = remoteURL.getPath().split("/");
if (splitPath.length > 0) { if (splitPath.length > 0) {

View File

@ -1,7 +1,6 @@
package cc.arduino.utils.network; package cc.arduino.utils.network;
import cc.arduino.net.CustomProxySelector; import cc.arduino.net.CustomProxySelector;
import com.sun.istack.internal.NotNull;
import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Base64;
import org.apache.commons.httpclient.CircularRedirectException; import org.apache.commons.httpclient.CircularRedirectException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -50,7 +49,7 @@ public class HttpConnectionManager {
} }
public HttpURLConnection makeConnection(@NotNull Consumer<HttpURLConnection> beforeConnection) public HttpURLConnection makeConnection(Consumer<HttpURLConnection> beforeConnection)
throws IOException, NoSuchMethodException, ScriptException, URISyntaxException { throws IOException, NoSuchMethodException, ScriptException, URISyntaxException {
return makeConnection(this.requestURL, 0, beforeConnection); return makeConnection(this.requestURL, 0, beforeConnection);
} }
@ -61,8 +60,8 @@ public class HttpConnectionManager {
return makeConnection(this.requestURL, 0, (c) -> {}); return makeConnection(this.requestURL, 0, (c) -> {});
} }
private HttpURLConnection makeConnection(@NotNull URL requestURL, int movedTimes, private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
@NotNull Consumer<HttpURLConnection> beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException { Consumer<HttpURLConnection> beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException {
log.info("Prepare http request to " + requestURL); log.info("Prepare http request to " + requestURL);
if (movedTimes > 3) { if (movedTimes > 3) {
log.warn("Too many redirect " + requestURL); log.warn("Too many redirect " + requestURL);