THRIFT-897. compiler: Don't allow unqualified enum constant access
authorBryan Duxbury <bryanduxbury@apache.org>
Sun, 12 Sep 2010 15:29:38 +0000 (15:29 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Sun, 12 Sep 2010 15:29:38 +0000 (15:29 +0000)
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

compiler/cpp/src/generate/t_java_generator.cc

index 93985f7..c1047f9 100644 (file)
@@ -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);