THRIFT-427. java: Fix print_const_value

Simplify it a bit in the process, because the beans-style setters
are produced even in non-beans mode, and they handle isset internally.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@762956 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 d6440a7..f709528 100644
--- a/compiler/cpp/src/generate/t_java_generator.cc
+++ b/compiler/cpp/src/generate/t_java_generator.cc
@@ -462,14 +462,8 @@
       }
       string val = render_const_value(out, name, field_type, v_iter->second);
       indent(out) << name << ".";
-      if (bean_style_) {
-        std::string cap_name = get_cap_name(v_iter->first->get_string());
-        out << "set" << cap_name << "(" << val << ")";
-      } else {
-        out << v_iter->first->get_string() << " = " << val;
-      }
-      out << ";" << endl;
-      indent(out) << name << ".__isset." << v_iter->first->get_string() << " = true;" << endl;
+      std::string cap_name = get_cap_name(v_iter->first->get_string());
+      out << "set" << cap_name << "(" << val << ");" << endl;
     }
     if (!in_static) {
       indent_down();