commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug #1953] LineNumberReader incorrect use of PushbackReader


From: nobody
Subject: [Bug #1953] LineNumberReader incorrect use of PushbackReader
Date: Thu, 12 Dec 2002 09:52:01 -0500

=================== BUG #1953: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1953&group_id=85

Changes by: Mark Wielaard <address@hidden>
Date: 2002-Dec-12 15:51 (Europe/Amsterdam)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
         Assigned to | None                      | mark
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Thanks. I have added a Mauve test for this and will check in your fix.



=================== BUG #1953: FULL BUG SNAPSHOT ===================


Submitted by: None                      Project: classpath                      
Submitted on: 2002-Dec-11 22:33
Severity:  5 - Major                    Resolution:  Fixed                      
Assigned to:  mark                      Status:  Closed                         
Platform Version:  None                 

Summary:  LineNumberReader incorrect use of PushbackReader

Original Submission:  This bug was originally filed against SableVM 1.0.5.

I was trying to run an app and got an exception that looked like this:

    java.io.IOException: Pushback buffer is full
            at java.io.PushbackReader.unread(PushbackReader.java:319)
            at java.io.LineNumberReader.read(LineNumberReader.java:246)
            ...

This appears to be a bug in LineNumberReader.java, which the
patch below seems to fix.


--- work/sablevm-class-library-1.0.5/src/java/io/LineNumberReader.java.orig
Mon Dec  9 19:12:35 2002
+++ work/sablevm-class-library-1.0.5/src/java/io/LineNumberReader.java  Mon Dec 
 9 19:12:02 2002
@@ -115,7 +115,7 @@
   public
   LineNumberReader(Reader in, int size)
   {
-    super(new PushbackReader(in), size);
+    super(in, size);
   }
 
   /*************************************************************************/
@@ -243,7 +243,7 @@
         int extra_char_read = super.read();
 
         if ((extra_char_read != '\n') && (extra_char_read != -1))
-          ((PushbackReader)in).unread(extra_char_read);
+          pos--;
 
         char_read = '\n';
         ++line_number;



Follow-up Comments
*******************

-------------------------------------------------------
Date: 2002-Dec-12 15:51             By: mark
Thanks. I have added a Mauve test for this and will check in your fix.


CC list is empty


No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1953&group_id=85



reply via email to

[Prev in Thread] Current Thread [Next in Thread]