From 79eb32f816daf52a959d6af57dc0c95c4066c954 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 21 Feb 2014 11:14:30 +0100 Subject: [PATCH 1/2] Fixed NPE when RXCHAR event with no bytes. Closes #1885 --- app/src/processing/app/Serial.java | 2 +- build/shared/revisions.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Serial.java b/app/src/processing/app/Serial.java index a5d826896..b8acc4615 100644 --- a/app/src/processing/app/Serial.java +++ b/app/src/processing/app/Serial.java @@ -175,7 +175,7 @@ public class Serial implements SerialPortEventListener { public synchronized void serialEvent(SerialPortEvent serialEvent) { if (serialEvent.isRXCHAR()) { try { - byte[] buf = port.readBytes(); + byte[] buf = port.readBytes(serialEvent.getEventValue()); if (buf.length > 0) { if (bufferLast == buffer.length) { byte temp[] = new byte[bufferLast << 1]; diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index 0ca8c1660..41e14b1db 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -1,4 +1,9 @@ +ARDUINO 1.5.6-r2 BETA 2014.02.21 + +[ide] +* JSSC: Fixed NPE when RXCHAR event with no bytes (José Pereda) + ARDUINO 1.5.6 BETA 2014.02.20 [ide] From f3619c312355be77d15b60519dcf06617ebcf6c5 Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Fri, 21 Feb 2014 16:21:32 +0100 Subject: [PATCH 2/2] Closes #277. Cores files intentionally left out of the commit as they require a different approach and have a different history --- app/src/cc/arduino/packages/Uploader.java | 2 -- app/src/cc/arduino/packages/uploaders/SerialUploader.java | 2 -- app/src/processing/app/debug/Sizer.java | 2 -- app/src/processing/app/debug/TargetPackage.java | 2 -- app/src/processing/app/debug/TargetPlatform.java | 2 -- app/src/processing/app/helpers/PreferencesMap.java | 2 -- app/src/processing/app/helpers/StringReplacer.java | 2 -- app/src/processing/app/syntax/CTokenMarker.java | 1 - app/src/processing/app/syntax/DefaultInputHandler.java | 1 - app/src/processing/app/syntax/InputHandler.java | 1 - app/src/processing/app/syntax/JEditTextArea.java | 1 - app/src/processing/app/syntax/KeywordMap.java | 1 - app/src/processing/app/syntax/SyntaxDocument.java | 1 - app/src/processing/app/syntax/SyntaxStyle.java | 1 - app/src/processing/app/syntax/SyntaxUtilities.java | 1 - app/src/processing/app/syntax/TextUtilities.java | 1 - app/src/processing/app/syntax/Token.java | 1 - build/linux/dist/tools/avrdude.conf | 2 -- 18 files changed, 26 deletions(-) diff --git a/app/src/cc/arduino/packages/Uploader.java b/app/src/cc/arduino/packages/Uploader.java index 2b9195701..784869fbf 100644 --- a/app/src/cc/arduino/packages/Uploader.java +++ b/app/src/cc/arduino/packages/Uploader.java @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package cc.arduino.packages; diff --git a/app/src/cc/arduino/packages/uploaders/SerialUploader.java b/app/src/cc/arduino/packages/uploaders/SerialUploader.java index d51cdbb89..9eefff106 100644 --- a/app/src/cc/arduino/packages/uploaders/SerialUploader.java +++ b/app/src/cc/arduino/packages/uploaders/SerialUploader.java @@ -22,8 +22,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package cc.arduino.packages.uploaders; diff --git a/app/src/processing/app/debug/Sizer.java b/app/src/processing/app/debug/Sizer.java index 09cb8ea30..ccf3cbfb1 100644 --- a/app/src/processing/app/debug/Sizer.java +++ b/app/src/processing/app/debug/Sizer.java @@ -20,8 +20,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package processing.app.debug; diff --git a/app/src/processing/app/debug/TargetPackage.java b/app/src/processing/app/debug/TargetPackage.java index 68c1a488c..dce91d178 100644 --- a/app/src/processing/app/debug/TargetPackage.java +++ b/app/src/processing/app/debug/TargetPackage.java @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package processing.app.debug; diff --git a/app/src/processing/app/debug/TargetPlatform.java b/app/src/processing/app/debug/TargetPlatform.java index 91e9ef974..da4a1b28a 100644 --- a/app/src/processing/app/debug/TargetPlatform.java +++ b/app/src/processing/app/debug/TargetPlatform.java @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package processing.app.debug; diff --git a/app/src/processing/app/helpers/PreferencesMap.java b/app/src/processing/app/helpers/PreferencesMap.java index bac942a77..39c6f394f 100644 --- a/app/src/processing/app/helpers/PreferencesMap.java +++ b/app/src/processing/app/helpers/PreferencesMap.java @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package processing.app.helpers; diff --git a/app/src/processing/app/helpers/StringReplacer.java b/app/src/processing/app/helpers/StringReplacer.java index 60445e063..19f7bce58 100644 --- a/app/src/processing/app/helpers/StringReplacer.java +++ b/app/src/processing/app/helpers/StringReplacer.java @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - $Id$ */ package processing.app.helpers; diff --git a/app/src/processing/app/syntax/CTokenMarker.java b/app/src/processing/app/syntax/CTokenMarker.java index 1fdb33fe6..ccb9b0b48 100644 --- a/app/src/processing/app/syntax/CTokenMarker.java +++ b/app/src/processing/app/syntax/CTokenMarker.java @@ -15,7 +15,6 @@ import javax.swing.text.Segment; * C token marker. * * @author Slava Pestov - * @version $Id: CTokenMarker.java 1268 2005-04-09 02:30:37Z benfry $ */ public class CTokenMarker extends TokenMarker { diff --git a/app/src/processing/app/syntax/DefaultInputHandler.java b/app/src/processing/app/syntax/DefaultInputHandler.java index 9814cf252..e9e23fea1 100644 --- a/app/src/processing/app/syntax/DefaultInputHandler.java +++ b/app/src/processing/app/syntax/DefaultInputHandler.java @@ -19,7 +19,6 @@ import java.util.StringTokenizer; * The default input handler. It maps sequences of keystrokes into actions * and inserts key typed events into the text area. * @author Slava Pestov - * @version $Id: DefaultInputHandler.java 1438 2005-05-11 08:34:16Z benfry $ */ public class DefaultInputHandler extends InputHandler { diff --git a/app/src/processing/app/syntax/InputHandler.java b/app/src/processing/app/syntax/InputHandler.java index 9a11d3866..e14671348 100644 --- a/app/src/processing/app/syntax/InputHandler.java +++ b/app/src/processing/app/syntax/InputHandler.java @@ -24,7 +24,6 @@ import java.util.*; * to the implementations of this class to do so. * * @author Slava Pestov - * @version $Id: InputHandler.java 6126 2010-02-16 23:43:53Z fry $ */ public abstract class InputHandler extends KeyAdapter { diff --git a/app/src/processing/app/syntax/JEditTextArea.java b/app/src/processing/app/syntax/JEditTextArea.java index f0f80bf86..c12102038 100644 --- a/app/src/processing/app/syntax/JEditTextArea.java +++ b/app/src/processing/app/syntax/JEditTextArea.java @@ -55,7 +55,6 @@ import processing.app.syntax.im.InputMethodSupport; * + "}"); * * @author Slava Pestov - * @version $Id: JEditTextArea.java 6123 2010-02-16 21:43:44Z fry $ */ public class JEditTextArea extends JComponent { diff --git a/app/src/processing/app/syntax/KeywordMap.java b/app/src/processing/app/syntax/KeywordMap.java index 065d92b3f..27d225f8c 100644 --- a/app/src/processing/app/syntax/KeywordMap.java +++ b/app/src/processing/app/syntax/KeywordMap.java @@ -20,7 +20,6 @@ import javax.swing.text.Segment; * This class is used by CTokenMarker to map keywords to ids. * * @author Slava Pestov, Mike Dillon - * @version $Id: KeywordMap.java 2050 2006-03-11 00:50:01Z fry $ */ public class KeywordMap { diff --git a/app/src/processing/app/syntax/SyntaxDocument.java b/app/src/processing/app/syntax/SyntaxDocument.java index 7b07a4269..2a1c3103c 100644 --- a/app/src/processing/app/syntax/SyntaxDocument.java +++ b/app/src/processing/app/syntax/SyntaxDocument.java @@ -18,7 +18,6 @@ import javax.swing.undo.UndoableEdit; * system. * * @author Slava Pestov - * @version $Id: SyntaxDocument.java 1268 2005-04-09 02:30:37Z benfry $ */ public class SyntaxDocument extends PlainDocument { diff --git a/app/src/processing/app/syntax/SyntaxStyle.java b/app/src/processing/app/syntax/SyntaxStyle.java index ac3dd797d..23a7c71b0 100644 --- a/app/src/processing/app/syntax/SyntaxStyle.java +++ b/app/src/processing/app/syntax/SyntaxStyle.java @@ -21,7 +21,6 @@ import javax.swing.JComponent; * A simple text style class. It can specify the color, italic flag, * and bold flag of a run of text. * @author Slava Pestov - * @version $Id: SyntaxStyle.java 4824 2008-10-11 23:41:40Z fry $ */ public class SyntaxStyle { diff --git a/app/src/processing/app/syntax/SyntaxUtilities.java b/app/src/processing/app/syntax/SyntaxUtilities.java index 1e3c6c900..84fc1b4d1 100644 --- a/app/src/processing/app/syntax/SyntaxUtilities.java +++ b/app/src/processing/app/syntax/SyntaxUtilities.java @@ -20,7 +20,6 @@ import java.util.regex.Pattern; * subsystem. * * @author Slava Pestov - * @version $Id: SyntaxUtilities.java 1268 2005-04-09 02:30:37Z benfry $ */ public class SyntaxUtilities { diff --git a/app/src/processing/app/syntax/TextUtilities.java b/app/src/processing/app/syntax/TextUtilities.java index d31f8f3b7..f009cd051 100644 --- a/app/src/processing/app/syntax/TextUtilities.java +++ b/app/src/processing/app/syntax/TextUtilities.java @@ -14,7 +14,6 @@ import javax.swing.text.*; /** * Class with several utility functions used by the text area component. * @author Slava Pestov - * @version $Id: TextUtilities.java 1268 2005-04-09 02:30:37Z benfry $ */ public class TextUtilities { diff --git a/app/src/processing/app/syntax/Token.java b/app/src/processing/app/syntax/Token.java index 06dc26323..ad7c8a59f 100644 --- a/app/src/processing/app/syntax/Token.java +++ b/app/src/processing/app/syntax/Token.java @@ -17,7 +17,6 @@ package processing.app.syntax; * token in the text, and a pointer to the next token in the list. * * @author Slava Pestov - * @version $Id: Token.java 1268 2005-04-09 02:30:37Z benfry $ */ public class Token { diff --git a/build/linux/dist/tools/avrdude.conf b/build/linux/dist/tools/avrdude.conf index d3dd109c6..9eaefecc7 100644 --- a/build/linux/dist/tools/avrdude.conf +++ b/build/linux/dist/tools/avrdude.conf @@ -1,5 +1,3 @@ -# $Id: avrdude.conf.in 991 2011-08-26 20:50:32Z joerg_wunsch $ -*- text -*- -# # AVRDUDE Configuration File # # This file contains configuration data used by AVRDUDE which describes