Skip to content

Commit

Permalink
Upgrade grpc-java to 1.65.1
Browse files Browse the repository at this point in the history
  • Loading branch information
barchetta committed Nov 14, 2024
1 parent f79dedd commit 3df5dbc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 4 additions & 0 deletions grpc/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<groupId>io.grpc</groupId>
<artifactId>grpc-inprocess</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-util</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 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 @@ -18,9 +18,9 @@

import javax.inject.Named;

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;

/**
* A supplier of {@link MethodDescriptor.Marshaller} instances for specific
Expand Down Expand Up @@ -69,7 +69,7 @@ class DefaultMarshallerSupplier

@Override
public <T> MethodDescriptor.Marshaller<T> get(Class<T> clazz) {
if (MessageLite.class.isAssignableFrom(clazz)) {
if (Message.class.isAssignableFrom(clazz)) {
return proto.get(clazz);
}
return JavaMarshaller.instance();
Expand All @@ -89,9 +89,9 @@ class ProtoMarshallerSupplier
public <T> MethodDescriptor.Marshaller<T> get(Class<T> clazz) {
try {
java.lang.reflect.Method getDefaultInstance = clazz.getDeclaredMethod("getDefaultInstance");
MessageLite instance = (MessageLite) getDefaultInstance.invoke(clazz);
Message instance = (Message) getDefaultInstance.invoke(clazz);

return (MethodDescriptor.Marshaller<T>) ProtoLiteUtils.marshaller(instance);
return (MethodDescriptor.Marshaller<T>) ProtoUtils.marshaller(instance);
} catch (Exception e) {
String msg = String.format(
"Attempting to use class %s, which is not a valid Protocol buffer message, with a default marshaller",
Expand Down
3 changes: 1 addition & 2 deletions grpc/core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
* Copyright (c) 2019, 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 Down Expand Up @@ -33,7 +33,6 @@

requires io.grpc.netty;
requires transitive io.grpc.protobuf;
requires io.grpc.protobuf.lite;
requires transitive io.grpc.stub;
requires transitive io.grpc;
requires io.netty.handler;
Expand Down
3 changes: 1 addition & 2 deletions microprofile/grpc/server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
* Copyright (c) 2019, 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 Down Expand Up @@ -27,7 +27,6 @@
requires io.helidon.microprofile.server;
requires io.helidon.config.mp;

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

requires java.logging;
Expand Down

0 comments on commit 3df5dbc

Please sign in to comment.