diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-14 05:44:38 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-14 05:44:38 +0000 |
commit | 97862d8af821324f8cd0990cdb506276f410abb2 (patch) | |
tree | 19c9df39b1601a04a6ace8386dcc6fdce70bc4f9 /libjava | |
parent | 5f8ebf29eb26edf9ea2d2c7157f7af609ef3b6b5 (diff) | |
download | gcc-97862d8af821324f8cd0990cdb506276f410abb2.tar.gz |
2003-06-14 Michael Koch <konqueror@gmx.de>
* java/io/BufferedReader.java,
java/io/FileOutputStream.java:
New versions from classpath.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/io/BufferedReader.java | 3 | ||||
-rw-r--r-- | libjava/java/io/FileOutputStream.java | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 24a8e9dbaf7..09472793385 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2003-06-14 Michael Koch <konqueror@gmx.de> + + * java/io/BufferedReader.java, + java/io/FileOutputStream.java: + New versions from classpath. + 2003-06-12 Andrew Haley <aph@redhat.com> * prims.cc (catch_segv): Create exception in handler. diff --git a/libjava/java/io/BufferedReader.java b/libjava/java/io/BufferedReader.java index eb2e2d29efe..46c9e417b1b 100644 --- a/libjava/java/io/BufferedReader.java +++ b/libjava/java/io/BufferedReader.java @@ -164,6 +164,9 @@ public class BufferedReader extends Reader */ public void mark(int readLimit) throws IOException { + if (readLimit < 0) + throw new IllegalArgumentException(); + synchronized (lock) { checkStatus(); diff --git a/libjava/java/io/FileOutputStream.java b/libjava/java/io/FileOutputStream.java index f4488dcca93..12543506643 100644 --- a/libjava/java/io/FileOutputStream.java +++ b/libjava/java/io/FileOutputStream.java @@ -85,7 +85,8 @@ public class FileOutputStream extends OutputStream if (s != null) s.checkWrite(path); fd = new FileDescriptor (path, (append - ? FileDescriptor.APPEND + ? FileDescriptor.WRITE + | FileDescriptor.APPEND : FileDescriptor.WRITE)); } |