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
2 changed files with 4 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue