aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2001-10-23 06:04:58 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-10-23 07:04:58 +0100
commite042de67c417be47543ba76cce6685337a0681b6 (patch)
treea46e4c67c941640013dd011094967be19fee8fae
parentd9d6919ebb05d39f4742b31ee4ecedbb2e59d8dc (diff)
downloadgcc-e042de67c417be47543ba76cce6685337a0681b6.zip
gcc-e042de67c417be47543ba76cce6685337a0681b6.tar.gz
gcc-e042de67c417be47543ba76cce6685337a0681b6.tar.bz2
BufferedWriter (write (String, int, int)): Remove redundant bounds checks.
* java/io/BufferedWriter (write (String, int, int)): Remove redundant bounds checks. (write (char[], int, int)): Likewise. From-SVN: r46426
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/java/io/BufferedWriter.java6
2 files changed, 4 insertions, 6 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index ef44aba..bdd60919 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -7,6 +7,10 @@
* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Handle
duplicate class registration with JvFail if the runtime hasn't been
initialized yet.
+
+ * java/io/BufferedWriter (write (String, int, int)): Remove redundant
+ bounds checks.
+ (write (char[], int, int)): Likewise.
2001-10-22 Tom Tromey <tromey@redhat.com>
diff --git a/libjava/java/io/BufferedWriter.java b/libjava/java/io/BufferedWriter.java
index ef12bd5..371c496 100644
--- a/libjava/java/io/BufferedWriter.java
+++ b/libjava/java/io/BufferedWriter.java
@@ -160,9 +160,6 @@ public class BufferedWriter extends Writer
*/
public void write (char[] buf, int offset, int len) throws IOException
{
- if (offset < 0 || len < 0 || offset + len > buf.length)
- throw new ArrayIndexOutOfBoundsException ();
-
synchronized (lock)
{
if (buffer == null)
@@ -199,9 +196,6 @@ public class BufferedWriter extends Writer
*/
public void write (String str, int offset, int len) throws IOException
{
- if (offset < 0 || len < 0 || offset + len > str.length())
- throw new ArrayIndexOutOfBoundsException ();
-
synchronized (lock)
{
if (buffer == null)