Skip to content

Commit e71e5a5

Browse files
committed
Revert "null check on SerialPort.readBytes"
This reverts commit 9916634.
1 parent 37f5315 commit e71e5a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/src/processing/app/Serial.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,8 @@ public synchronized void serialEvent(SerialPortEvent serialEvent) {
185185
case SerialPortEvent.RXFLAG:
186186
try {
187187
byte[] bytes = port.readBytes();
188-
if (bytes == null) {
189-
return;
190-
}
191188
String bytesAsString = new String(bytes);
192-
if (monitor) {
189+
if(monitor) {
193190
System.out.print(bytesAsString);
194191
}
195192
if (this.consumer != null) {
@@ -202,6 +199,7 @@ public synchronized void serialEvent(SerialPortEvent serialEvent) {
202199
}
203200

204201

202+
205203
/**
206204
* This will handle both ints, bytes and chars transparently.
207205
*/

0 commit comments

Comments
 (0)