From e71e5a535695e7b523f06b3c493c4cf71b541913 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 27 Feb 2013 17:54:40 +0100 Subject: [PATCH] Revert "null check on SerialPort.readBytes" This reverts commit 991663409ab875aa22bb181d4833a490e5db1b50. --- app/src/processing/app/Serial.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/Serial.java b/app/src/processing/app/Serial.java index 858c6e276..c1caaec4a 100644 --- a/app/src/processing/app/Serial.java +++ b/app/src/processing/app/Serial.java @@ -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. */