diff --git a/grpc/core/pom.xml b/grpc/core/pom.xml index 22d180f9aba..d33b400f24f 100644 --- a/grpc/core/pom.xml +++ b/grpc/core/pom.xml @@ -53,6 +53,10 @@ io.grpc grpc-inprocess + + io.grpc + grpc-util + io.grpc grpc-netty diff --git a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java index 1e30673fd8e..e132e1d2666 100644 --- a/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java +++ b/grpc/core/src/main/java/io/helidon/grpc/core/MarshallerSupplier.java @@ -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. @@ -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 @@ -69,7 +69,7 @@ class DefaultMarshallerSupplier @Override public MethodDescriptor.Marshaller get(Class clazz) { - if (MessageLite.class.isAssignableFrom(clazz)) { + if (Message.class.isAssignableFrom(clazz)) { return proto.get(clazz); } return JavaMarshaller.instance(); @@ -89,9 +89,9 @@ class ProtoMarshallerSupplier public MethodDescriptor.Marshaller get(Class 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) ProtoLiteUtils.marshaller(instance); + return (MethodDescriptor.Marshaller) 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", diff --git a/grpc/core/src/main/java/module-info.java b/grpc/core/src/main/java/module-info.java index 89d9a3be212..88df54664d7 100644 --- a/grpc/core/src/main/java/module-info.java +++ b/grpc/core/src/main/java/module-info.java @@ -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. @@ -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; diff --git a/microprofile/grpc/server/src/main/java/module-info.java b/microprofile/grpc/server/src/main/java/module-info.java index 6ba4136c44a..402034d1b41 100644 --- a/microprofile/grpc/server/src/main/java/module-info.java +++ b/microprofile/grpc/server/src/main/java/module-info.java @@ -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. @@ -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;