[armedbear-cvs] r11980 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Mon Jun 1 18:24:55 UTC 2009


Author: ehuelsmann
Date: Mon Jun  1 14:24:53 2009
New Revision: 11980

Log:
Remove a catch {} block we can manually check for,
we expect this improves performance.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Stream.java

Modified: trunk/abcl/src/org/armedbear/lisp/Stream.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Stream.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Stream.java	Mon Jun  1 14:24:53 2009
@@ -1793,9 +1793,9 @@
    */
   protected int _readChar() throws ConditionThrowable
   {
-    if (pastEnd)
-      return -1;
-    
+    if (reader == null)
+        streamNotCharacterInputStream();
+
     try
       {
         int n = reader.read();
@@ -1823,11 +1823,6 @@
 
         return n;
       }
-    catch (NullPointerException e)
-      {
-        // reader is null
-        streamNotCharacterInputStream();
-      }
     catch (IOException e)
       {
         error(new StreamError(this, e));




More information about the armedbear-cvs mailing list