Simplify conversion of ByteArrayOutputStream to String
Closes gh-24785
This commit is contained in:
committed by
Sam Brannen
parent
62c545d0ed
commit
65aa2d03f0
@@ -183,7 +183,7 @@ public class ProtobufMessageConverter extends AbstractMessageConverter {
|
||||
else if (this.protobufFormatSupport != null) {
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
this.protobufFormatSupport.print(message, outputStream, contentType, charset);
|
||||
payload = new String(outputStream.toByteArray(), charset);
|
||||
payload = outputStream.toString(charset.name());
|
||||
}
|
||||
}
|
||||
catch (IOException ex) {
|
||||
|
||||
Reference in New Issue
Block a user