From: Bryan Duxbury Date: Sun, 12 Sep 2010 15:29:38 +0000 (+0000) Subject: THRIFT-897. compiler: Don't allow unqualified enum constant access X-Git-Tag: 0.5.0~46 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=76ecb91c3d7034c939d6df9316f571cbf9f7ce09;p=common%2Fthrift.git THRIFT-897. compiler: Don't allow unqualified enum constant access Fix some confusion in the java generator about adding the class name. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@996327 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc index 93985f7e..c1047f97 100644 --- a/compiler/cpp/src/generate/t_java_generator.cc +++ b/compiler/cpp/src/generate/t_java_generator.cc @@ -631,7 +631,7 @@ string t_java_generator::render_const_value(ofstream& out, string name, t_type* throw "compiler error: no const of base type " + t_base_type::t_base_name(tbase); } } else if (type->is_enum()) { - render << type_name(type, false, false) << "." << value->get_identifier(); + render << value->get_identifier(); } else { string t = tmp("tmp"); print_const_value(out, t, type, value, true);