-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug
Milestone
Description
Affects: 6.*.*
The following test fails:
import static org.junit.jupiter.api.Assertions.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.Test;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
class DefaultDataBufferStringTransformationTest {
@Test
void test() {
Charset charset = StandardCharsets.UTF_8;
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.allocateBuffer(DefaultDataBufferFactory.DEFAULT_INITIAL_CAPACITY);
String name = "Müller";
int repeatCount = 19;
for(int i = 0; i < repeatCount; i++) {
dataBuffer.write(name, charset);
}
String expected = name.repeat(repeatCount);
String result = dataBuffer.toString(charset);
assertEquals(expected, result);
}
}
May be it has something to do with this issue.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: bugA general bugA general bug