Commit e042de67 by Bryce McKinlay Committed by Bryce McKinlay

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
parent d9d6919e
......@@ -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>
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment