Skip to content

Commit 45136aa

Browse files
committed
Upgrade to Protobuf 3.9 (plus consistent XMLUnit declarations)
1 parent cdeb1fe commit 45136aa

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

spring-core/spring-core.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ dependencies {
8686
testCompile("io.projectreactor:reactor-test")
8787
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
8888
testCompile("com.google.code.findbugs:jsr305:3.0.2")
89-
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
9089
testCompile("org.xmlunit:xmlunit-assertj:2.6.2")
90+
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
9191
testCompile("javax.xml.bind:jaxb-api:2.3.1")
9292
testCompile("com.fasterxml.woodstox:woodstox-core:5.2.0") {
9393
exclude group: "stax", module: "stax-api"

spring-oxm/spring-oxm.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ dependencies {
7070
exclude group: "stax", module: "stax-api"
7171
}
7272
testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
73-
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
7473
testCompile("org.xmlunit:xmlunit-assertj:2.6.2")
74+
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
7575
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1")
7676
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")
7777
}

spring-web/spring-web.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dependencies {
5656
optional("com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jackson2Version}")
5757
optional("com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson2Version}")
5858
optional("com.google.code.gson:gson:2.8.5")
59-
optional("com.google.protobuf:protobuf-java-util:3.7.1")
59+
optional("com.google.protobuf:protobuf-java-util:3.9.0")
6060
optional("com.googlecode.protobuf-java-format:protobuf-java-format:1.4")
6161
optional("com.rometools:rome:1.12.1")
6262
optional("com.caucho:hessian:4.0.51")
@@ -78,8 +78,8 @@ dependencies {
7878
testCompile("com.squareup.okhttp3:mockwebserver:3.14.2")
7979
testCompile("org.jetbrains.kotlin:kotlin-reflect")
8080
testCompile("org.skyscreamer:jsonassert:1.5.0")
81-
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
8281
testCompile("org.xmlunit:xmlunit-assertj:2.6.2")
82+
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
8383
testRuntime("com.sun.mail:javax.mail:1.6.2")
8484
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0.1")
8585
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0.1")

spring-web/src/main/java/org/springframework/http/converter/protobuf/ProtobufHttpMessageConverter.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -231,6 +231,7 @@ protected boolean canWrite(@Nullable MediaType mediaType) {
231231
(this.protobufFormatSupport != null && this.protobufFormatSupport.supportsWriteOnly(mediaType)));
232232
}
233233

234+
@SuppressWarnings("deprecation")
234235
@Override
235236
protected void writeInternal(Message message, HttpOutputMessage outputMessage)
236237
throws IOException, HttpMessageNotWritableException {
@@ -253,7 +254,7 @@ protected void writeInternal(Message message, HttpOutputMessage outputMessage)
253254
}
254255
else if (TEXT_PLAIN.isCompatibleWith(contentType)) {
255256
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputMessage.getBody(), charset);
256-
TextFormat.print(message, outputStreamWriter);
257+
TextFormat.print(message, outputStreamWriter); // deprecated on Protobuf 3.9
257258
outputStreamWriter.flush();
258259
outputMessage.getBody().flush();
259260
}

spring-webflux/spring-webflux.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040
}
4141
optional("org.jetbrains.kotlin:kotlin-reflect")
4242
optional("org.jetbrains.kotlin:kotlin-stdlib")
43-
optional("com.google.protobuf:protobuf-java-util:3.7.1")
43+
optional("com.google.protobuf:protobuf-java-util:3.9.0")
4444
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion}")
4545
optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:${coroutinesVersion}")
4646
testCompile("javax.xml.bind:jaxb-api:2.3.1")

0 commit comments

Comments
 (0)