]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10364 upgrade protobuf to 3.5.1 3028/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 7 Feb 2018 08:09:31 +0000 (09:09 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 12 Feb 2018 08:23:05 +0000 (09:23 +0100)
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

pom.xml
server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java
server/sonar-server/src/test/java/org/sonar/server/ws/TestResponse.java

diff --git a/pom.xml b/pom.xml
index adf83a9be5c0f749f25fa83752361eb08b49d891..6adcdfb8628d49393ff2b4aeec2797ac28e776d3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -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>
 
         <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>
index 49fd109656725155d7cc393407999f261c11bc67..e859b1be1133b584c473849b6a3191d33dba1f64 100644 (file)
@@ -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);
   }
 
index 8f833d763a6a095bd0ad9cbe0cc348ded409acef..0d2286f04e32e93c4c620a936ff9a53a3d3c8fdd 100644 (file)
@@ -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")