Skip to content

Commit cfd3cf2

Browse files
committed
Use correctly the setBoardName() method in NetworkDiscovery
1 parent 9ba172b commit cfd3cf2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arduino-core/src/cc/arduino/packages/discoverers/NetworkDiscovery.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,12 @@ public void serviceResolved(ServiceEvent serviceEvent) {
113113
String label = name + " at " + address;
114114
if (board != null && BaseNoGui.packages != null) {
115115
String boardName = BaseNoGui.getPlatform().resolveDeviceByBoardID(BaseNoGui.packages, board);
116-
if (boardName != null) {
117-
label += " (" + boardName + ")";
118-
}
116+
port.setBoardName(boardName);
119117
} else if (description != null) {
120118
label += " (" + description + ")";
121119
}
122120

123121
port.setAddress(address);
124-
port.setBoardName(name);
125122
port.setProtocol("network");
126123
port.setLabel(label);
127124

0 commit comments

Comments
 (0)