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