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

Code reformat

This commit is contained in:
Mattia Bertorello 2019-07-03 18:06:16 +02:00
parent 1bc994ec86
commit f2a4ea5e15
No known key found for this signature in database
GPG Key ID: CE1FB2BE91770F24
3 changed files with 25 additions and 20 deletions

View File

@ -27,13 +27,17 @@ public class CacheControl {
while (matcher.find()) { while (matcher.find()) {
switch (matcher.group(1).toLowerCase()) { switch (matcher.group(1).toLowerCase()) {
case "max-age": case "max-age":
cc.setMaxAge(Integer.parseInt(matcher.group(3))); break; cc.setMaxAge(Integer.parseInt(matcher.group(3)));
break;
case "must-revalidate": case "must-revalidate":
cc.setMustRevalidate(true); break; cc.setMustRevalidate(true);
break;
case "no-cache": case "no-cache":
cc.setNoCache(true); break; cc.setNoCache(true);
break;
case "no-store": case "no-store":
cc.setNoStore(true); break; cc.setNoStore(true);
break;
default: //ignore default: //ignore
} }
} }

View File

@ -67,7 +67,8 @@ public class HttpConnectionManager {
public HttpURLConnection makeConnection() public HttpURLConnection makeConnection()
throws IOException, NoSuchMethodException, ScriptException, URISyntaxException { throws IOException, NoSuchMethodException, ScriptException, URISyntaxException {
return makeConnection(this.requestURL, 0, (c) -> {}); return makeConnection(this.requestURL, 0, (c) -> {
});
} }
private HttpURLConnection makeConnection(URL requestURL, int movedTimes, private HttpURLConnection makeConnection(URL requestURL, int movedTimes,