diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-02-07 09:09:31 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-02-12 09:23:05 +0100 |
commit | 3ba0210407680ae481d91658f0b623d5353a2663 (patch) | |
tree | e3b5d7b4c7d3517b92037493bb7a3ffec32613d5 | |
parent | 916f7021154eae9c7c88f0f219884d972573209c (diff) | |
download | sonarqube-3ba0210407680ae481d91658f0b623d5353a2663.tar.gz sonarqube-3ba0210407680ae481d91658f0b623d5353a2663.zip |
SONAR-10364 upgrade protobuf to 3.5.1
3.2.0 includes "The default parsing byte size limit has been raised from 64MB to 2GB"
next versions include bug fixes and performance improvements
-rw-r--r-- | pom.xml | 4 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java | 4 | ||||
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -88,7 +88,7 @@ <okhttp.version>3.7.0</okhttp.version> <jackson.version>2.6.6</jackson.version> <jjwt.version>0.9.0</jjwt.version> - <protobuf.version>3.0.0-beta-2</protobuf.version> + <protobuf.version>3.5.1</protobuf.version> <hazelcast.version>3.8.6</hazelcast.version> @@ -269,7 +269,7 @@ <plugin> <groupId>org.xolstice.maven.plugins</groupId> <artifactId>protobuf-maven-plugin</artifactId> - <version>0.5.0</version> + <version>0.5.1</version> </plugin> <plugin> <groupId>com.github.genthaler</groupId> diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java index 49fd1096567..e859b1be113 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java @@ -23,7 +23,7 @@ import com.google.common.base.Throwables; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Maps; -import com.google.protobuf.GeneratedMessage; +import com.google.protobuf.GeneratedMessageV3; import java.io.InputStream; import java.util.HashMap; import java.util.List; @@ -149,7 +149,7 @@ public class TestRequest extends ValidatingRequest { } } - public <T extends GeneratedMessage> T executeProtobuf(Class<T> protobufClass) { + public <T extends GeneratedMessageV3> T executeProtobuf(Class<T> protobufClass) { return setMediaType(PROTOBUF).execute().getInputObject(protobufClass); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java b/server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java index 8f833d763a6..0d2286f04e3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java @@ -19,7 +19,7 @@ */ package org.sonar.server.ws; -import com.google.protobuf.GeneratedMessage; +import com.google.protobuf.GeneratedMessageV3; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.lang.reflect.Method; @@ -40,7 +40,7 @@ public class TestResponse { return new ByteArrayInputStream(dumbResponse.getFlushedOutput()); } - public <T extends GeneratedMessage> T getInputObject(Class<T> protobufClass) { + public <T extends GeneratedMessageV3> T getInputObject(Class<T> protobufClass) { try (InputStream input = getInputStream()) { Method parseFromMethod = protobufClass.getMethod("parseFrom", InputStream.class); @SuppressWarnings("unchecked") |