lint: Use generic List instead of ArrayList where possible

This commit is contained in:
Cristian Maglie 2017-11-07 15:38:57 +01:00
parent a3f59fae91
commit 4b374dc16d
2 changed files with 7 additions and 7 deletions

View File

@ -154,12 +154,12 @@ public class Compiler implements MessageConsumer {
}
public String build(CompilerProgressListener progListener, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
ArrayList<CompilerProgressListener> listeners = new ArrayList<>();
List<CompilerProgressListener> listeners = new ArrayList<>();
listeners.add(progListener);
return this.build(listeners, exportHex);
}
public String build(ArrayList<CompilerProgressListener> progListeners, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
public String build(List<CompilerProgressListener> progListeners, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
this.buildPath = sketch.getBuildPath().getAbsolutePath();
this.buildCache = BaseNoGui.getCachePath();

View File

@ -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<CompilerProgressListener> progressListeners;
private List<CompilerProgressListener> progressListeners;
private final ExternalProcessOutputParser parser;
public ProgressAwareMessageConsumer(MessageConsumer parent, ArrayList<CompilerProgressListener> progressListeners) {
public ProgressAwareMessageConsumer(MessageConsumer parent, List<CompilerProgressListener> progressListeners) {
this.parent = parent;
this.progressListeners = progressListeners;
this.parser = new ExternalProcessOutputParser();