Support for Protobuf 4.x
This commit compiles our Protobuf against 4.27, effectively raising our baseline to 3.9+. This commit also re-generates all the Java messages from the .proto spec using the latest protoc binary. Closes gh-33011
This commit is contained in:
@@ -203,7 +203,6 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
(this.protobufFormatSupport != null && this.protobufFormatSupport.supportsWriteOnly(mediaType)));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void writeInternal(Message message, HttpOutputMessage outputMessage)
|
||||
throws IOException, HttpMessageNotWritableException {
|
||||
@@ -226,7 +225,7 @@ public class ProtobufHttpMessageConverter extends AbstractHttpMessageConverter<M
|
||||
}
|
||||
else if (TEXT_PLAIN.isCompatibleWith(contentType)) {
|
||||
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputMessage.getBody(), charset);
|
||||
TextFormat.print(message, outputStreamWriter); // deprecated on Protobuf 3.9
|
||||
TextFormat.printer().print(message, outputStreamWriter);
|
||||
outputStreamWriter.flush();
|
||||
outputMessage.getBody().flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user