From 7b149a68c6bf89e4863f204f0d1c4999495486d7 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Mon, 18 Oct 2021 16:53:39 +0100 Subject: [PATCH] Fix assertion message in DefaultDataBuffer Closes gh-27567 --- .../springframework/core/io/buffer/DefaultDataBuffer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java index be2155f3433..19346e00c56 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DefaultDataBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -462,9 +462,9 @@ public class DefaultDataBuffer implements DataBuffer { private void checkIndex(int index, int length) { assertIndex(index >= 0, "index %d must be >= 0", index); - assertIndex(length >= 0, "length %d must be >= 0", index); + assertIndex(length >= 0, "length %d must be >= 0", length); assertIndex(index <= this.capacity, "index %d must be <= %d", index, this.capacity); - assertIndex(length <= this.capacity, "length %d must be <= %d", index, this.capacity); + assertIndex(length <= this.capacity, "length %d must be <= %d", length, this.capacity); } private void assertIndex(boolean expression, String format, Object... args) {