mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8302664: Fix several incorrect usages of Preconditions.checkFromIndexSize
Reviewed-by: djelinski, dfuchs, alanb
This commit is contained in:
parent
6b082fb3c6
commit
43cf8b3d80
8 changed files with 19 additions and 19 deletions
|
@ -154,7 +154,7 @@ public class Inflater {
|
|||
* @see Inflater#needsInput
|
||||
*/
|
||||
public void setInput(byte[] input, int off, int len) {
|
||||
Preconditions.checkFromIndexSize(len, off, input.length, Preconditions.AIOOBE_FORMATTER);
|
||||
Preconditions.checkFromIndexSize(off, len, input.length, Preconditions.AIOOBE_FORMATTER);
|
||||
synchronized (zsRef) {
|
||||
this.input = null;
|
||||
this.inputArray = input;
|
||||
|
@ -219,7 +219,7 @@ public class Inflater {
|
|||
* @see Inflater#getAdler
|
||||
*/
|
||||
public void setDictionary(byte[] dictionary, int off, int len) {
|
||||
Preconditions.checkFromIndexSize(len, off, dictionary.length, Preconditions.AIOOBE_FORMATTER);
|
||||
Preconditions.checkFromIndexSize(off, len, dictionary.length, Preconditions.AIOOBE_FORMATTER);
|
||||
synchronized (zsRef) {
|
||||
ensureOpen();
|
||||
setDictionary(zsRef.address(), dictionary, off, len);
|
||||
|
@ -363,7 +363,7 @@ public class Inflater {
|
|||
public int inflate(byte[] output, int off, int len)
|
||||
throws DataFormatException
|
||||
{
|
||||
Preconditions.checkFromIndexSize(len, off, output.length, Preconditions.AIOOBE_FORMATTER);
|
||||
Preconditions.checkFromIndexSize(off, len, output.length, Preconditions.AIOOBE_FORMATTER);
|
||||
synchronized (zsRef) {
|
||||
ensureOpen();
|
||||
ByteBuffer input = this.input;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue