mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Revert "null check on SerialPort.readBytes"
This reverts commit 991663409ab875aa22bb181d4833a490e5db1b50.
This commit is contained in:
parent
37f5315464
commit
e71e5a5356
@ -185,11 +185,8 @@ public class Serial implements SerialPortEventListener {
|
||||
case SerialPortEvent.RXFLAG:
|
||||
try {
|
||||
byte[] bytes = port.readBytes();
|
||||
if (bytes == null) {
|
||||
return;
|
||||
}
|
||||
String bytesAsString = new String(bytes);
|
||||
if (monitor) {
|
||||
if(monitor) {
|
||||
System.out.print(bytesAsString);
|
||||
}
|
||||
if (this.consumer != null) {
|
||||
@ -202,6 +199,7 @@ public class Serial implements SerialPortEventListener {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This will handle both ints, bytes and chars transparently.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user