# HG changeset patch # User sherman # Date 1376588519 25200 # Node ID af60b1abf237808f8da59be1a95be277e0eba1c3 # Parent 931c01c5c3aad8b799b14b55cea6b9841c1375bc 7154662: {CRC32, Adler32}.update(byte[] b, int off, int len): undocumented ArrayIndexOutOfBoundsException Summary: to add the throws clause Reviewed-by: alanb, chegar diff -r 931c01c5c3aa -r af60b1abf237 jdk/src/share/classes/java/util/zip/Adler32.java --- a/jdk/src/share/classes/java/util/zip/Adler32.java Thu Aug 15 15:16:31 2013 +0100 +++ b/jdk/src/share/classes/java/util/zip/Adler32.java Thu Aug 15 10:41:59 2013 -0700 @@ -62,6 +62,11 @@ /** * 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) { diff -r 931c01c5c3aa -r af60b1abf237 jdk/src/share/classes/java/util/zip/CRC32.java --- a/jdk/src/share/classes/java/util/zip/CRC32.java Thu Aug 15 15:16:31 2013 +0100 +++ b/jdk/src/share/classes/java/util/zip/CRC32.java Thu Aug 15 10:41:59 2013 -0700 @@ -60,6 +60,11 @@ /** * 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) {