You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2023/01/10 03:48:19 UTC
[GitHub] [dubbo] EarthChen commented on a diff in pull request #11249: Remove grpc-status-details when no pb exists
EarthChen commented on code in PR #11249:
URL: https://github.com/apache/dubbo/pull/11249#discussion_r1065309063
##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/stream/AbstractStream.java:
##########
@@ -30,8 +30,23 @@ public abstract class AbstractStream implements Stream {
protected final Executor executor;
protected final FrameworkModel frameworkModel;
+
+ public static final boolean HAS_PROTOBUF = hasProtobuf();
+
+ public static final boolean GRPC_STATUS_DETAIL_ENABLED = HAS_PROTOBUF;
+
public AbstractStream(Executor executor, FrameworkModel frameworkModel) {
this.executor = new SerializingExecutor(executor);
this.frameworkModel = frameworkModel;
}
+
+
+ private static boolean hasProtobuf() {
+ try {
+ Class.forName("com.google.protobuf.Message");
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org