Skip to content

Commit 4fa57be

Browse files
committed
partly revert commit 3c16ac0 to pass legacy tests
all this code will be replaced/removed as soon as the native library is fully validated
1 parent d3f96c6 commit 4fa57be

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

arduino-core/src/processing/app/linux/UDevAdmParser.java

+1-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@ public String extractVIDAndPID(String output) throws IOException {
1212

1313
Object vid = properties.get("ID_VENDOR_ID");
1414
Object pid = properties.get("ID_MODEL_ID");
15-
Object serial = properties.get("ID_SERIAL_SHORT");
1615
if (vid == null || pid == null)
1716
return null;
18-
if (serial == null) {
19-
serial = "";
20-
}
21-
return ("0x" + vid + "_0x" + pid).toUpperCase() + "_" + serial;
17+
return ("0x" + vid + "_0x" + pid).toUpperCase();
2218
}
23-
2419
}

arduino-core/src/processing/app/macosx/SystemProfilerParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public String extractVIDAndPID(String output, String serial) throws IOException
8181
String computedDevicePathMinusChar = computedDevicePath.substring(0, computedDevicePath.length() - 1);
8282
String serialMinusChar = serial.substring(0, serial.length() - 1);
8383
if (computedDevicePath.equalsIgnoreCase(serial) || computedDevicePathMinusChar.equalsIgnoreCase(serialMinusChar)) {
84-
return (device.get(VID) + "_" + device.get(PID)).toUpperCase() + "_" + device.get(SERIAL_NUMBER);
84+
return (device.get(VID) + "_" + device.get(PID)).toUpperCase();
8585
}
8686
}
8787
device = new HashMap<>();

arduino-core/src/processing/app/windows/ListComPortsParser.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ public String extractVIDAndPID(String output, String serial) throws IOException
5959
String vidPidPart = lineParts[lineParts.length - 1];
6060
Matcher vidMatcher = vidRegExp.matcher(vidPidPart);
6161
Matcher pidMatcher = pidRegExp.matcher(vidPidPart);
62-
String iSerial = vidPidPart.substring(vidPidPart.lastIndexOf("\\")+1);
6362
if (vidMatcher.find() && pidMatcher.find()) {
64-
return ("0x" + vidMatcher.group(1) + "_0x" + pidMatcher.group(1)).toUpperCase() + "_" + iSerial;
63+
return ("0x" + vidMatcher.group(1) + "_0x" + pidMatcher.group(1)).toUpperCase();
6564
}
6665
}
6766
}

0 commit comments

Comments
 (0)