force PMD v7

PMD v7: fix new design/SimplifyBooleanReturns matches
PMD v7: fix new bestpractices/UnusedAssignment matches
PMD v7: fix new bestpractices/LiteralsFirstInComparisons matches
PMD v7: fix new codestyle/UnnecessaryFullyQualifiedName matches
PMD v7: fix new bestpractices/LooseCoupling matches
PMD rules: bestpractices/UseVarargs
PMD rules: sort lines
This commit is contained in:
M*C*O
2024-06-10 16:34:12 +00:00
committed by Laurent Clouet
parent 46f893327d
commit 48f3761656
17 changed files with 121 additions and 122 deletions

View File

@@ -619,7 +619,7 @@ import okhttp3.HttpUrl;
// Insert the info at the beginning of the error log
writer.write(logHeader.toString().getBytes());
Optional<ArrayList<String>> logs = this.log.getForCheckPoint(step);
Optional<List<String>> logs = this.log.getForCheckPoint(step);
if (logs.isPresent()) {
for (String line : logs.get()) {
writer.write(line.getBytes());
@@ -799,7 +799,7 @@ import okhttp3.HttpUrl;
int threads = Math.max(1, Math.min(total, 12)); // at least one thread, to avoid IllegalArgumentException if total = 0
ExecutorService executor = Executors.newFixedThreadPool(threads);
ArrayList<Callable<Error.Type>> tasks = new ArrayList<>();
List<Callable<Error.Type>> tasks = new ArrayList<>();
this.gui.getDownloadProgress().reset("Downloading project");
@@ -944,6 +944,7 @@ import okhttp3.HttpUrl;
return 0;
}
@SuppressWarnings("unused") // Suppress false positive about this.isValidatingJob - PMD rule cannot detect time-sensitive reads
protected Error.Type confirmJob(Job ajob, int checkpoint) {
String urlReal = String.format(LOCALE, "%s&rendertime=%d&preptime=%d&memoryused=%s", ajob.getValidationUrl(), ajob.getProcessRender().getRenderDuration(), ajob.getProcessRender().getScenePrepDuration(),
ajob.getProcessRender().getPeakMemoryUsed());