代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/thrift 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/compiler/cpp/src/thrift/generate/t_java_generator.cc b/compiler/cpp/src/thrift/generate/t_java_generator.cc
index fb581e4..90dfa06 100644
--- a/compiler/cpp/src/thrift/generate/t_java_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_java_generator.cc
@@ -4657,8 +4657,9 @@ void t_java_generator::generate_deep_copy_non_container(ofstream& out,
std::string dest_name,
t_type* type) {
(void)dest_name;
+ type = get_true_type(type);
if (type->is_base_type() || type->is_enum() || type->is_typedef()) {
- if (((t_base_type*)type)->is_binary()) {
+ if (type->is_binary()) {
out << "org.apache.thrift.TBaseHelper.copyBinary(" << source_name << ")";
} else {
// everything else can be copied directly
diff --git a/compiler/cpp/src/thrift/parse/t_type.h b/compiler/cpp/src/thrift/parse/t_type.h
index 30f8c1f7..3a6d1e04 100644
--- a/compiler/cpp/src/thrift/parse/t_type.h
+++ b/compiler/cpp/src/thrift/parse/t_type.h
@@ -47,6 +47,7 @@ public:
virtual bool is_void() const { return false; }
virtual bool is_base_type() const { return false; }
virtual bool is_string() const { return false; }
+ virtual bool is_binary() const { return false; }
virtual bool is_bool() const { return false; }
virtual bool is_typedef() const { return false; }
virtual bool is_enum() const { return false; }
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。