Skip to content

Commit

Permalink
Convert CircularRedirectException in IOException
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Bertorello committed Jun 28, 2019
1 parent e6f0912 commit d3e7122
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import cc.arduino.net.CustomProxySelector;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.httpclient.CircularRedirectException;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -65,7 +64,7 @@ private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
log.info("Prepare http request to " + requestURL);
if (movedTimes > 3) {
log.warn("Too many redirect " + requestURL);
throw new CircularRedirectException("Too many redirect " + requestURL);
throw new IOException("Too many redirect " + requestURL);
}

Proxy proxy = new CustomProxySelector(PreferencesData.getMap())
Expand Down

0 comments on commit d3e7122

Please sign in to comment.