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
This commit is contained in:
parent
d9d6919ebb
commit
e042de67c4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user