diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2024-10-04 15:36:46 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-07 20:03:16 +0000 |
commit | 6f886fb39d99cc49e20ac430f695f319b948dc2f (patch) | |
tree | 397c85f7e5063072f404e92b86f3b472e789d8bc /server/sonar-webserver-ws | |
parent | 85cdf5270d3cd639614e3d6422ef9724ec0e1e07 (diff) | |
download | sonarqube-6f886fb39d99cc49e20ac430f695f319b948dc2f.tar.gz sonarqube-6f886fb39d99cc49e20ac430f695f319b948dc2f.zip |
SONAR-23133 Upgrade com.google.protobuf protoc and protobuf-java from 3.25.5 to 4.28.2
Diffstat (limited to 'server/sonar-webserver-ws')
-rw-r--r-- | server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestRequest.java | 4 | ||||
-rw-r--r-- | server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestResponse.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestRequest.java b/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestRequest.java index bb75f1cca9e..d5b3e5cbcff 100644 --- a/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestRequest.java +++ b/server/sonar-webserver-ws/src/testFixtures/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.ImmutableMap; import com.google.common.collect.ListMultimap; -import com.google.protobuf.GeneratedMessageV3; +import com.google.protobuf.GeneratedMessage; import java.io.BufferedReader; import java.io.InputStream; import java.io.StringReader; @@ -186,7 +186,7 @@ public class TestRequest extends ValidatingRequest { } } - public <T extends GeneratedMessageV3> T executeProtobuf(Class<T> protobufClass) { + public <T extends GeneratedMessage> T executeProtobuf(Class<T> protobufClass) { return setMediaType(PROTOBUF).execute().getInputObject(protobufClass); } diff --git a/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestResponse.java b/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestResponse.java index da78a8978a4..8fee04c5f0e 100644 --- a/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestResponse.java +++ b/server/sonar-webserver-ws/src/testFixtures/java/org/sonar/server/ws/TestResponse.java @@ -19,7 +19,7 @@ */ package org.sonar.server.ws; -import com.google.protobuf.GeneratedMessageV3; +import com.google.protobuf.GeneratedMessage; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.lang.reflect.Method; @@ -43,7 +43,7 @@ public class TestResponse { return new ByteArrayInputStream(testableResponse.getFlushedOutput()); } - public <T extends GeneratedMessageV3> T getInputObject(Class<T> protobufClass) { + public <T extends GeneratedMessage> T getInputObject(Class<T> protobufClass) { try (InputStream input = getInputStream()) { Method parseFromMethod = protobufClass.getMethod("parseFrom", InputStream.class); @SuppressWarnings("unchecked") |