mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
Fixed a bunch of trivial javac warnings
This commit is contained in:
parent
804d890ce2
commit
674419a464
@ -98,7 +98,7 @@ public class EditorStatus extends JPanel {
|
|||||||
this.message = NO_MESSAGE;
|
this.message = NO_MESSAGE;
|
||||||
this.mode = NOTICE;
|
this.mode = NOTICE;
|
||||||
this.font = Theme.getFont("status.font");
|
this.font = Theme.getFont("status.font");
|
||||||
this.compilerProgressListeners = new ArrayList<CompilerProgressListener>();
|
this.compilerProgressListeners = new ArrayList<>();
|
||||||
this.compilerProgressListeners.add(this::progressUpdate);
|
this.compilerProgressListeners.add(this::progressUpdate);
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
@ -382,6 +382,9 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
|
|||||||
case SERIAL:
|
case SERIAL:
|
||||||
editor.handleSerial();
|
editor.handleSerial();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,8 @@ public class SerialMonitor extends AbstractTextMonitor {
|
|||||||
case 3:
|
case 3:
|
||||||
s += "\r\n";
|
s += "\r\n";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if ("".equals(s) && lineEndings.getSelectedIndex() == 0 && !PreferencesData.has("runtime.line.ending.alert.notified")) {
|
if ("".equals(s) && lineEndings.getSelectedIndex() == 0 && !PreferencesData.has("runtime.line.ending.alert.notified")) {
|
||||||
noLineEndingAlert.setForeground(Color.RED);
|
noLineEndingAlert.setForeground(Color.RED);
|
||||||
|
@ -153,7 +153,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String build(CompilerProgressListener progListener, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
|
public String build(CompilerProgressListener progListener, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
|
||||||
ArrayList<CompilerProgressListener> listeners = new ArrayList<CompilerProgressListener>();
|
ArrayList<CompilerProgressListener> listeners = new ArrayList<>();
|
||||||
listeners.add(progListener);
|
listeners.add(progListener);
|
||||||
return this.build(listeners, exportHex);
|
return this.build(listeners, exportHex);
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ import cc.arduino.packages.Discovery;
|
|||||||
import processing.app.BaseNoGui;
|
import processing.app.BaseNoGui;
|
||||||
|
|
||||||
import javax.jmdns.*;
|
import javax.jmdns.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -42,8 +41,6 @@ import cc.arduino.packages.discoverers.network.BoardReachabilityFilter;
|
|||||||
|
|
||||||
public class NetworkDiscovery implements Discovery, ServiceListener {
|
public class NetworkDiscovery implements Discovery, ServiceListener {
|
||||||
|
|
||||||
private static final int MAX_TIME_AWAITING_FOR_PACKAGES = 5000;
|
|
||||||
|
|
||||||
private final List<BoardPort> reachableBoardPorts = new LinkedList<>();
|
private final List<BoardPort> reachableBoardPorts = new LinkedList<>();
|
||||||
private final List<BoardPort> boardPortsDiscoveredWithJmDNS = new LinkedList<>();
|
private final List<BoardPort> boardPortsDiscoveredWithJmDNS = new LinkedList<>();
|
||||||
private Timer reachabilityTimer;
|
private Timer reachabilityTimer;
|
||||||
|
@ -34,16 +34,12 @@ import cc.arduino.packages.discoverers.NetworkDiscovery;
|
|||||||
import processing.app.helpers.NetUtils;
|
import processing.app.helpers.NetUtils;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class BoardReachabilityFilter extends TimerTask {
|
public class BoardReachabilityFilter extends TimerTask {
|
||||||
|
|
||||||
private final NetworkDiscovery networkDiscovery;
|
private final NetworkDiscovery networkDiscovery;
|
||||||
private Enumeration<NetworkInterface> staticNetworkInterfaces;
|
|
||||||
private final List<String> staticNetworkInterfacesList = new LinkedList<>();
|
|
||||||
|
|
||||||
public BoardReachabilityFilter(NetworkDiscovery networkDiscovery) {
|
public BoardReachabilityFilter(NetworkDiscovery networkDiscovery) {
|
||||||
this.networkDiscovery = networkDiscovery;
|
this.networkDiscovery = networkDiscovery;
|
||||||
|
@ -33,6 +33,7 @@ import java.util.Collections;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import cc.arduino.contributions.libraries.ContributedLibrary;
|
||||||
import processing.app.helpers.FileUtils;
|
import processing.app.helpers.FileUtils;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@ -79,7 +80,7 @@ public class LibraryList extends LinkedList<UserLibrary> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void sort() {
|
public synchronized void sort() {
|
||||||
Collections.sort(this, UserLibrary.CASE_INSENSITIVE_ORDER);
|
Collections.sort(this, ContributedLibrary.CASE_INSENSITIVE_ORDER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized LibraryList filterLibrariesInSubfolder(File subFolder) {
|
public synchronized LibraryList filterLibrariesInSubfolder(File subFolder) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user