Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades gRPC dependencies to latest versions #9105

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
<version.lib.google-api-client>1.34.1</version.lib.google-api-client>
<version.lib.google-oauth-client>1.33.3</version.lib.google-oauth-client>
<version.lib.google-error-prone>2.3.3</version.lib.google-error-prone>
<version.lib.google-protobuf>3.21.7</version.lib.google-protobuf>
<version.lib.google-protobuf>4.27.3</version.lib.google-protobuf>
<version.lib.graalvm>23.1.0</version.lib.graalvm>
<version.lib.graphql-java>18.6</version.lib.graphql-java>
<version.lib.graphql-java.extended.scalars>18.3</version.lib.graphql-java.extended.scalars>
<version.lib.gson>2.9.0</version.lib.gson>
<version.lib.grpc>1.60.0</version.lib.grpc>
<version.lib.grpc>1.65.1</version.lib.grpc>
<version.lib.guava>32.0.1-jre</version.lib.guava>
<version.lib.h2>2.2.220</version.lib.h2>
<version.lib.hamcrest>1.3</version.lib.hamcrest>
Expand Down
1 change: 0 additions & 1 deletion grpc/core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
requires transitive io.grpc.stub;
requires transitive com.google.protobuf;
requires transitive io.grpc.protobuf;
requires transitive io.grpc.protobuf.lite;

exports io.helidon.grpc.core;
}
1 change: 0 additions & 1 deletion microprofile/grpc/server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
requires io.helidon.webserver.grpc;

requires io.grpc;
requires io.grpc.protobuf.lite;
requires com.google.protobuf;

requires microprofile.health.api;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,9 +19,9 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.google.protobuf.MessageLite;
import com.google.protobuf.Message;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.lite.ProtoLiteUtils;
import io.grpc.protobuf.ProtoUtils;

final class ProtoMarshaller {
private static final Map<Class<?>, MethodDescriptor.Marshaller<?>> CACHE = new ConcurrentHashMap<>();
Expand All @@ -35,12 +35,12 @@ static <T> MethodDescriptor.Marshaller<T> get(Class<T> clazz) {
if (result != null) {
return result;
}
// i may create it twice, but that should not really matter
// it may create it twice, but that should not really matter
try {
java.lang.reflect.Method getDefaultInstance = clazz.getDeclaredMethod("getDefaultInstance");
MessageLite instance = (MessageLite) getDefaultInstance.invoke(clazz);
Message instance = (Message) getDefaultInstance.invoke(clazz);

result = (MethodDescriptor.Marshaller<T>) ProtoLiteUtils.marshaller(instance);
result = (MethodDescriptor.Marshaller<T>) ProtoUtils.marshaller(instance);
MethodDescriptor.Marshaller<T> current = (MethodDescriptor.Marshaller<T>) CACHE.putIfAbsent(clazz, result);
return current == null ? result : current;
} catch (ReflectiveOperationException e) {
Expand Down
Loading