From 4b374dc16dc5237daeac6f6ead9f76aaf9b26941 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 7 Nov 2017 15:38:57 +0100 Subject: [PATCH] lint: Use generic List instead of ArrayList where possible --- arduino-core/src/cc/arduino/Compiler.java | 4 ++-- .../src/cc/arduino/ProgressAwareMessageConsumer.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arduino-core/src/cc/arduino/Compiler.java b/arduino-core/src/cc/arduino/Compiler.java index 5d825437f..be942ec79 100644 --- a/arduino-core/src/cc/arduino/Compiler.java +++ b/arduino-core/src/cc/arduino/Compiler.java @@ -154,12 +154,12 @@ public class Compiler implements MessageConsumer { } public String build(CompilerProgressListener progListener, boolean exportHex) throws RunnerException, PreferencesMapException, IOException { - ArrayList listeners = new ArrayList<>(); + List listeners = new ArrayList<>(); listeners.add(progListener); return this.build(listeners, exportHex); } - public String build(ArrayList progListeners, boolean exportHex) throws RunnerException, PreferencesMapException, IOException { + public String build(List progListeners, boolean exportHex) throws RunnerException, PreferencesMapException, IOException { this.buildPath = sketch.getBuildPath().getAbsolutePath(); this.buildCache = BaseNoGui.getCachePath(); diff --git a/arduino-core/src/cc/arduino/ProgressAwareMessageConsumer.java b/arduino-core/src/cc/arduino/ProgressAwareMessageConsumer.java index 6432e0447..789a680f6 100644 --- a/arduino-core/src/cc/arduino/ProgressAwareMessageConsumer.java +++ b/arduino-core/src/cc/arduino/ProgressAwareMessageConsumer.java @@ -29,19 +29,19 @@ package cc.arduino; +import java.util.List; +import java.util.Map; + import cc.arduino.i18n.ExternalProcessOutputParser; import processing.app.debug.MessageConsumer; -import java.util.Map; -import java.util.ArrayList; - public class ProgressAwareMessageConsumer implements MessageConsumer { private final MessageConsumer parent; - private ArrayList progressListeners; + private List progressListeners; private final ExternalProcessOutputParser parser; - public ProgressAwareMessageConsumer(MessageConsumer parent, ArrayList progressListeners) { + public ProgressAwareMessageConsumer(MessageConsumer parent, List progressListeners) { this.parent = parent; this.progressListeners = progressListeners; this.parser = new ExternalProcessOutputParser();