[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: Fixlet for DataInputStream.readLine
From: |
Roman Kennke |
Subject: |
Re: [cp-patches] FYI: Fixlet for DataInputStream.readLine |
Date: |
Fri, 17 Jun 2005 11:47:15 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050317) |
Jeroen> I don't know how others feel about this, but I would be more
Jeroen> comfortable if you took it out.
Done.
2005-06-17 Roman Kennke <address@hidden>
* java/io/DataInputStream.java:
Reverted my patch from 2005-06-15.
/Roman
Index: java/io/DataInputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/io/DataInputStream.java,v
retrieving revision 1.29
diff -u -r1.29 DataInputStream.java
--- java/io/DataInputStream.java 15 Jun 2005 15:18:42 -0000 1.29
+++ java/io/DataInputStream.java 17 Jun 2005 09:38:50 -0000
@@ -361,30 +361,9 @@
int next_c = in.read();
if (next_c != '\n' && next_c != -1)
{
- if (in instanceof BufferedInputStream)
- {
- BufferedInputStream bin = (BufferedInputStream) in;
- if (bin.pos > 0)
- bin.pos--;
- }
- else if (in instanceof StringBufferInputStream)
- {
- StringBufferInputStream bin = (StringBufferInputStream)
in;
- if (bin.pos > 0)
- bin.pos--;
- }
- else if (in instanceof ByteArrayInputStream)
- {
- ByteArrayInputStream bin = (ByteArrayInputStream) in;
- if (bin.pos > 0)
- bin.pos--;
- }
- else
- {
- if (! (in instanceof PushbackInputStream))
- in = new PushbackInputStream(in);
- ((PushbackInputStream) in).unread(next_c);
- }
+ if (!(in instanceof PushbackInputStream))
+ in = new PushbackInputStream(in);
+ ((PushbackInputStream) in).unread(next_c);
}
break;
}