Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void flush() throws IOException {
super.flush();
try {
ByteArrayOutputStream baos = (ByteArrayOutputStream) out;
String text = new String(baos.toByteArray(), encoding);
String text = baos.toString(encoding);
message.setText(text);
} catch (JMSException ex) {
throw new JmsTransportException(ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class MessageOutputStream extends FilterOutputStream {
public void flush() throws IOException {
super.flush();
ByteArrayOutputStream bos = (ByteArrayOutputStream) out;
String text = new String(bos.toByteArray(), encoding);
String text = bos.toString(encoding);
message.setBody(text);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void testSendAndReceiveQueueTextMessage() throws Exception {

ByteArrayOutputStream bos = new ByteArrayOutputStream();
messageFactory.createMessage().writeTo(bos);
final String text = new String(bos.toByteArray(), StandardCharsets.UTF_8);
final String text = bos.toString(StandardCharsets.UTF_8);

jmsTemplate.send(request.getJMSReplyTo(), session -> {

Expand Down