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

Fix linter problems

This commit is contained in:
Mattia Bertorello 2019-07-12 15:11:40 +02:00
parent 4da41f7fa5
commit 636f93058b
No known key found for this signature in database
GPG Key ID: CE1FB2BE91770F24
2 changed files with 8 additions and 10 deletions

View File

@ -117,13 +117,13 @@ public class FileDownloaderCache {
}
}
static Optional<FileCached> getFileCached(final URL remoteURL)
public static Optional<FileCached> getFileCached(final URL remoteURL)
throws URISyntaxException, NoSuchMethodException, ScriptException,
IOException {
return getFileCached(remoteURL, true);
}
static Optional<FileCached> getFileCached(final URL remoteURL, boolean enableCache)
public static Optional<FileCached> getFileCached(final URL remoteURL, boolean enableCache)
throws URISyntaxException, NoSuchMethodException, ScriptException,
IOException {
// Return always and empty file if the cache is not enable
@ -305,7 +305,7 @@ public class FileDownloaderCache {
}
@JsonIgnore
Optional<File> getFileFromCache() {
public Optional<File> getFileFromCache() {
if (md5Check()) {
return Optional.of(Paths.get(localPath).toFile());
}
@ -313,7 +313,7 @@ public class FileDownloaderCache {
}
synchronized void updateCacheFile(File fileToCache) throws Exception {
public synchronized void updateCacheFile(File fileToCache) throws Exception {
Path cacheFilePath = Paths.get(localPath);
// If the cache directory does not exist create it
@ -343,7 +343,7 @@ public class FileDownloaderCache {
}
synchronized void invalidateCache() throws IOException {
public synchronized void invalidateCache() throws IOException {
cachedFiles.remove(remoteURL);
Files.deleteIfExists(Paths.get(localPath));
}
@ -356,7 +356,7 @@ public class FileDownloaderCache {
}
@JsonIgnore
boolean md5Check() {
public boolean md5Check() {
try {
return !Objects.isNull(getMD5()) && Objects.equals(calculateMD5(), getMD5());
} catch (Exception e) {
@ -366,7 +366,7 @@ public class FileDownloaderCache {
}
@JsonIgnore
LocalDateTime getExpiresTime() {
public LocalDateTime getExpiresTime() {
final int maxAge;
if (cacheControl != null) {
maxAge = cacheControl.getMaxAge();

View File

@ -257,11 +257,9 @@ public class Platform {
}
public static class BoardCloudAPIid {
public BoardCloudAPIid() {
}
private String name;
private String fqbn;
private String name;
private String architecture;
private String id;