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 /server | |
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
Diffstat (limited to 'server')
-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 |
2 files changed, 4 insertions, 4 deletions
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") |