diff --git a/src/share/classes/java/util/zip/Adler32.java b/src/share/classes/java/util/zip/Adler32.java index 23475c263dd4f74b976fe1977d29d5cd0945496c..bffc3af1c03a9b77faf1832593b1489c8d23f9b6 100644 --- a/src/share/classes/java/util/zip/Adler32.java +++ b/src/share/classes/java/util/zip/Adler32.java @@ -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) { diff --git a/src/share/classes/java/util/zip/CRC32.java b/src/share/classes/java/util/zip/CRC32.java index b5cccb0cc8ece109ee438a327f9415c13a1d42d7..187346fe55be2a8a8e1e882d93a6644d6e35d3a7 100644 --- a/src/share/classes/java/util/zip/CRC32.java +++ b/src/share/classes/java/util/zip/CRC32.java @@ -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) {