Skip to content

Commit 346b755

Browse files
committed
Fix assertion message in DefaultDataBuffer
Closes gh-27567
1 parent 4978eef commit 346b755

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -462,9 +462,9 @@ public String toString() {
462462

463463
private void checkIndex(int index, int length) {
464464
assertIndex(index >= 0, "index %d must be >= 0", index);
465-
assertIndex(length >= 0, "length %d must be >= 0", index);
465+
assertIndex(length >= 0, "length %d must be >= 0", length);
466466
assertIndex(index <= this.capacity, "index %d must be <= %d", index, this.capacity);
467-
assertIndex(length <= this.capacity, "length %d must be <= %d", index, this.capacity);
467+
assertIndex(length <= this.capacity, "length %d must be <= %d", length, this.capacity);
468468
}
469469

470470
private void assertIndex(boolean expression, String format, Object... args) {

0 commit comments

Comments
 (0)