提交 f6fe5efa 编写于 作者: S sherman

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

7154662: {CRC32, Adler32}.update(byte[] b, int off, int len): undocumented ArrayIndexOutOfBoundsException
Summary: to add the throws clause
Reviewed-by: alanb, chegar
上级 963d7827
...@@ -62,6 +62,11 @@ class Adler32 implements Checksum { ...@@ -62,6 +62,11 @@ class Adler32 implements Checksum {
/** /**
* Updates the checksum with the specified array of bytes. * 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) { public void update(byte[] b, int off, int len) {
if (b == null) { if (b == null) {
......
...@@ -60,6 +60,11 @@ class CRC32 implements Checksum { ...@@ -60,6 +60,11 @@ class CRC32 implements Checksum {
/** /**
* Updates the CRC-32 checksum with the specified array of bytes. * 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) { public void update(byte[] b, int off, int len) {
if (b == null) { if (b == null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册