7154662: {CRC32, Adler32}.update(byte[] b, int off, int len): undocumented ArrayIndexOutOfBoundsException

To add the throws clause

Reviewed-by: alanb, chegar
This commit is contained in:
Xueming Shen 2013-08-15 10:41:59 -07:00
parent 126c55f2cb
commit bb69156c80
2 changed files with 10 additions and 0 deletions

View File

@ -62,6 +62,11 @@ class Adler32 implements Checksum {
/**
* Updates the checksum with the specified array of bytes.
*
* @throws ArrayIndexOutOfBoundsException
* if {@code off} is negative, or {@code len} is negative,
* or {@code off+len} is greater than the length of the
* array {@code b}
*/
public void update(byte[] b, int off, int len) {
if (b == null) {

View File

@ -60,6 +60,11 @@ class CRC32 implements Checksum {
/**
* Updates the CRC-32 checksum with the specified array of bytes.
*
* @throws ArrayIndexOutOfBoundsException
* if {@code off} is negative, or {@code len} is negative,
* or {@code off+len} is greater than the length of the
* array {@code b}
*/
public void update(byte[] b, int off, int len) {
if (b == null) {