OSDN Git Service

* java/io/BufferedWriter (write (String, int, int)): Remove
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Oct 2001 06:04:58 +0000 (06:04 +0000)
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Oct 2001 06:04:58 +0000 (06:04 +0000)
redundant bounds checks.
(write (char[], int, int)): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46426 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/java/io/BufferedWriter.java

index ef44aba..bdd6091 100644 (file)
@@ -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>
 
index ef12bd5..371c496 100644 (file)
@@ -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)