1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-21 10:52:14 +01:00

Removed some trivial warnings

This commit is contained in:
Cristian Maglie 2020-03-25 12:59:36 +01:00 committed by Cristian Maglie
parent 931c2b7f21
commit a1e43ce490

View File

@ -999,9 +999,9 @@ public class Base {
// kill uploader (if still alive) // kill uploader (if still alive)
UploaderUtils uploaderInstance = new UploaderUtils(); UploaderUtils uploaderInstance = new UploaderUtils();
Uploader uploader = uploaderInstance.getUploaderByPreferences(false); Uploader uploader = uploaderInstance.getUploaderByPreferences(false);
if (uploader != null && uploader.programmerPid != null && uploader.programmerPid.isAlive()) { if (uploader != null && Uploader.programmerPid != null && Uploader.programmerPid.isAlive()) {
// kill the stuck programmer // kill the stuck programmer
uploader.programmerPid.destroyForcibly(); Uploader.programmerPid.destroyForcibly();
} }
if (handleQuitEach()) { if (handleQuitEach()) {
@ -1444,8 +1444,9 @@ public class Base {
String filterText = ""; String filterText = "";
String dropdownItem = ""; String dropdownItem = "";
if (actionevent instanceof Event) { if (actionevent instanceof Event) {
filterText = ((Event) actionevent).getPayload().get("filterText").toString(); Event e = ((Event) actionevent);
dropdownItem = ((Event) actionevent).getPayload().get("dropdownItem").toString(); filterText = e.getPayload().get("filterText").toString();
dropdownItem = e.getPayload().get("dropdownItem").toString();
} }
try { try {
openBoardsManager(filterText, dropdownItem); openBoardsManager(filterText, dropdownItem);
@ -1481,7 +1482,7 @@ public class Base {
ButtonGroup boardsButtonGroup = new ButtonGroup(); ButtonGroup boardsButtonGroup = new ButtonGroup();
Map<String, ButtonGroup> buttonGroupsMap = new HashMap<>(); Map<String, ButtonGroup> buttonGroupsMap = new HashMap<>();
List<JMenu> platformMenus = new ArrayList<JMenu>(); List<JMenu> platformMenus = new ArrayList<>();
// Cycle through all packages // Cycle through all packages
for (TargetPackage targetPackage : BaseNoGui.packages.values()) { for (TargetPackage targetPackage : BaseNoGui.packages.values()) {
@ -1602,7 +1603,7 @@ public class Base {
}; };
List<TargetBoard> boards = (List<TargetBoard>) subAction.getValue("board"); List<TargetBoard> boards = (List<TargetBoard>) subAction.getValue("board");
if (boards == null) { if (boards == null) {
boards = new ArrayList<TargetBoard>(); boards = new ArrayList<>();
} }
boards.add(board); boards.add(board);
subAction.putValue("board", boards); subAction.putValue("board", boards);
@ -2003,6 +2004,7 @@ public class Base {
Base.this.handleFontSizeChange(-1); Base.this.handleFontSizeChange(-1);
} }
break; break;
default:
} }
} }
} }