You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2009/02/19 22:21:47 UTC

svn commit: r746000 - in /incubator/thrift/trunk: compiler/cpp/src/generate/t_java_generator.cc lib/java/test/org/apache/thrift/test/EqualityTest.java lib/java/test/org/apache/thrift/test/ToStringTest.java

Author: bryanduxbury
Date: Thu Feb 19 21:21:44 2009
New Revision: 746000

URL: http://svn.apache.org/viewvc?rev=746000&view=rev
Log:
THRIFT-116. java: Isset fields for non-primitive types unnecessary

This patch gets rid of the __isset fields for non-primitives and updates ToStringTest and EqualityTest appropriately.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
    incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/EqualityTest.java
    incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/ToStringTest.java

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=746000&r1=745999&r2=746000&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Thu Feb 19 21:21:44 2009
@@ -92,7 +92,9 @@
 
   void generate_function_helpers(t_function* tfunction);
   std::string get_cap_name(std::string name);
-
+  std::string generate_isset_check(t_field* field);
+  void generate_isset_set(ofstream& out, t_field* field);
+  
   void generate_service_interface (t_service* tservice);
   void generate_service_helpers   (t_service* tservice);
   void generate_service_client    (t_service* tservice);
@@ -652,8 +654,10 @@
       indent() << "private static final class Isset implements java.io.Serializable {" << endl;
     indent_up();
       for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
-        indent(out) <<
-          "public boolean " << (*m_iter)->get_name() << " = false;" <<  endl;
+        if (!type_can_be_null((*m_iter)->get_type())){
+          indent(out) <<
+            "public boolean " << (*m_iter)->get_name() << " = false;" <<  endl;
+        }
       }
     indent_down();
     out <<
@@ -705,13 +709,7 @@
     for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
       indent(out) << "this." << (*m_iter)->get_name() << " = " <<
         (*m_iter)->get_name() << ";" << endl;
-      indent(out) << "this.__isset." << (*m_iter)->get_name() << " = ";
-      if (type_can_be_null((*m_iter)->get_type())) {
-        out << "(" << (*m_iter)->get_name() << " != null)";
-      } else {
-        out << "true";
-      }
-      out << ";" << endl;
+      generate_isset_set(out, (*m_iter));
     }
     indent_down();
     indent(out) << "}" << endl << endl;
@@ -728,11 +726,14 @@
     t_field* field = (*m_iter);
     std::string field_name = field->get_name();
     t_type* type = field->get_type();
+    bool can_be_null = type_can_be_null(type);
 
-    indent(out) << "__isset." << field_name << " = other.__isset." << field_name << ";" << endl;
+    if (!can_be_null) {
+      indent(out) << "__isset." << field_name << " = other.__isset." << field_name << ";" << endl;
+    }
 
-    if (type_can_be_null(type)) {
-      indent(out) << "if (other." << field_name << " != null) {" << endl;
+    if (can_be_null) {
+      indent(out) << "if (other." << generate_isset_check(field) << ") {" << endl;
       indent_up();
     }
 
@@ -745,7 +746,7 @@
       out << ";" << endl;
     }
 
-    if (type_can_be_null(type)) {
+    if (can_be_null) {
       indent_down();
       indent(out) << "}" << endl;
     }
@@ -820,13 +821,9 @@
     string that_present = "true";
     string unequal;
 
-    if (is_optional) {
-      this_present += " && (this.__isset." + name + ")";
-      that_present += " && (that.__isset." + name + ")";
-    }
-    if (can_be_null) {
-      this_present += " && (this." + name + " != null)";
-      that_present += " && (that." + name + " != null)";
+    if (is_optional || can_be_null) {
+      this_present += " && this." + generate_isset_check(*m_iter);
+      that_present += " && that." + generate_isset_check(*m_iter);
     }
 
     out <<
@@ -877,11 +874,8 @@
 
       string present = "true";
 
-      if (is_optional) {
-        present += " && (__isset." + name + ")";
-      }
-      if (can_be_null) {
-        present += " && (" + name + " != null)";
+      if (is_optional || can_be_null) {
+        present += " && (" + generate_isset_check(*m_iter) + ")";
       }
 
       out <<
@@ -955,8 +949,7 @@
         indent_up();
 
         generate_deserialize_field(out, *f_iter, "this.");
-        out <<
-          indent() << "this.__isset." << (*f_iter)->get_name() << " = true;" << endl;
+        generate_isset_set(out, *f_iter);
         indent_down();
         out <<
           indent() << "} else { " << endl <<
@@ -1084,8 +1077,7 @@
     }
     bool optional = bean_style_ && (*f_iter)->get_req() == t_field::T_OPTIONAL;
     if (optional) {
-      out <<
-        indent() << "if (this.__isset." << (*f_iter)->get_name() << ") {" << endl;
+      indent(out) << "if (" << generate_isset_check((*f_iter)) << ") {" << endl;
       indent_up();
     }
 
@@ -1146,21 +1138,13 @@
         endl <<
         indent() << "if ";
     } else {
-      out <<
-        " else if ";
+      out << " else if ";
     }
 
-    out <<
-      "(this.__isset." << (*f_iter)->get_name() << ") {" << endl;
-    indent_up();
-
-    bool null_allowed = type_can_be_null((*f_iter)->get_type());
-    if (null_allowed) {
-      out <<
-        indent() << "if (this." << (*f_iter)->get_name() << " != null) {" << endl;
-      indent_up();
-    }
+    out << "(this." << generate_isset_check(*f_iter) << ") {" << endl;
 
+    indent_up();
+    
     indent(out) << "oprot.writeFieldBegin(" << constant_name((*f_iter)->get_name()) << "_FIELD_DESC);" << endl;
 
     // Write field contents
@@ -1170,11 +1154,6 @@
     indent(out) <<
       "oprot.writeFieldEnd();" << endl;
 
-    if (null_allowed) {
-      indent_down();
-      indent(out) << "}" << endl;
-    }
-
     indent_down();
     indent(out) << "}";
   }
@@ -1285,7 +1264,7 @@
     t_field* field = *f_iter;
     indent(out) << "case " << upcase_string(field->get_name()) << ":" << endl;
     indent_up();
-    indent(out) << "return this.__isset." << field->get_name() << ";" << endl;
+    indent(out) << "return " << generate_isset_check(field) << ";" << endl;
     indent_down();
   }
 
@@ -1359,7 +1338,6 @@
       indent_down();
       indent(out) << "}" << endl;
       indent(out) << "this." << field_name << ".add(elem);" << endl;
-      indent(out) << "this.__isset." << field_name << " = true;" << endl;
       indent_down();
       indent(out) << "}" << endl << endl;
 
@@ -1381,7 +1359,6 @@
       indent_down();
       indent(out) << "}" << endl;
       indent(out) << "this." << field_name << ".put(key, val);" << endl;
-      indent(out) << "this.__isset." << field_name << " = true;" << endl;
       indent_down();
       indent(out) << "}" << endl << endl;
     }
@@ -1408,12 +1385,7 @@
     indent_up();
     indent(out) << "this." << field_name << " = " << field_name << ";" <<
       endl;
-    // if the type isn't nullable, then the setter can't have been an unset in disguise.
-    if ((type->is_base_type() && !type->is_string()) || type->is_enum() ) {
-      indent(out) << "this.__isset." << field_name << " = true;" << endl;
-    } else {
-      indent(out) << "this.__isset." << field_name << " = (" << field_name << " != null);" << endl;
-    }
+    generate_isset_set(out, field);
 
     indent_down();
     indent(out) << "}" << endl << endl;
@@ -1421,10 +1393,11 @@
     // Unsetter
     indent(out) << "public void unset" << cap_name << "() {" << endl;
     indent_up();
-    if (type->is_container() || type->is_struct() || type->is_xception()) {
+    if (type_can_be_null(type)) {
       indent(out) << "this." << field_name << " = null;" << endl;
+    } else {
+      indent(out) << "this.__isset." << field_name << " = false;" << endl;
     }
-    indent(out) << "this.__isset." << field_name << " = false;" << endl;
     indent_down();
     indent(out) << "}" << endl << endl;
 
@@ -1432,14 +1405,24 @@
     indent(out) << "// Returns true if field " << field_name << " is set (has been asigned a value) and false otherwise" << endl;
     indent(out) << "public boolean is" << get_cap_name("set") << cap_name << "() {" << endl;
     indent_up();
-    indent(out) << "return this.__isset." << field_name << ";" << endl;
+    if (type_can_be_null(type)) {
+      indent(out) << "return this." << field_name << " != null;" << endl;
+    } else {
+      indent(out) << "return this.__isset." << field_name << ";" << endl;
+    }
     indent_down();
     indent(out) << "}" << endl << endl;
     
     if(!bean_style_) {
       indent(out) << "public void set" << cap_name << get_cap_name("isSet") << "(boolean value) {" << endl;
       indent_up();
-      indent(out) << "this.__isset." << field_name << " = value;" << endl;
+      if (type_can_be_null(type)) {
+        indent(out) << "if (!value) {" << endl;
+        indent(out) << "  this." << field_name << " = null;" << endl;
+        indent(out) << "}" << endl;
+      } else {
+        indent(out) << "this.__isset." << field_name << " = value;" << endl;
+      }
       indent_down();
       indent(out) << "}" << endl << endl; 
     }
@@ -1463,36 +1446,50 @@
 
   const vector<t_field*>& fields = tstruct->get_members();
   vector<t_field*>::const_iterator f_iter;
+  bool first = true;
   for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
-    if((*f_iter)->get_req() == t_field::T_OPTIONAL) {
-      indent(out) << "if (__isset." << (*f_iter)->get_name() << ") {" << endl;
+    bool could_be_unset = (*f_iter)->get_req() == t_field::T_OPTIONAL;
+    if(could_be_unset) {
+      indent(out) << "if (" << generate_isset_check(*f_iter) << ") {" << endl;
       indent_up();
     }
 
     t_field* field = (*f_iter);
 
-    indent(out) << "if (!first) sb.append(\", \");" << endl;
+    if (!first) {
+      indent(out) << "if (!first) sb.append(\", \");" << endl;
+    }
     indent(out) << "sb.append(\"" << (*f_iter)->get_name() << ":\");" << endl;
-    if (field->get_type()->is_base_type() && ((t_base_type*)(field->get_type()))->is_binary()) {
-      indent(out) << "if (" << field->get_name() << " == null) { " << endl;
+    bool can_be_null = type_can_be_null(field->get_type());
+    if (can_be_null) {
+      indent(out) << "if (this." << (*f_iter)->get_name() << " == null) {" << endl;
       indent(out) << "  sb.append(\"null\");" << endl;
       indent(out) << "} else {" << endl;
+      indent_up();
+    }
+    
+    if (field->get_type()->is_base_type() && ((t_base_type*)(field->get_type()))->is_binary()) {
       indent(out) << "  int __" << field->get_name() << "_size = Math.min(this." << field->get_name() << ".length, 128);" << endl;
       indent(out) << "  for (int i = 0; i < __" << field->get_name() << "_size; i++) {" << endl;
       indent(out) << "    if (i != 0) sb.append(\" \");" << endl;
       indent(out) << "    sb.append(Integer.toHexString(this." << field->get_name() << "[i]).length() > 1 ? Integer.toHexString(this." << field->get_name() << "[i]).substring(Integer.toHexString(this." << field->get_name() << "[i]).length() - 2).toUpperCase() : \"0\" + Integer.toHexString(this." << field->get_name() << "[i]).toUpperCase());" <<endl;
       indent(out) << "  }" << endl;
       indent(out) << "  if (this." << field->get_name() << ".length > 128) sb.append(\" ...\");" << endl;
-      indent(out) << "}" << endl;
     } else {
       indent(out) << "sb.append(this." << (*f_iter)->get_name() << ");" << endl;
     }
+    
+    if (can_be_null) {
+      indent_down();
+      indent(out) << "}" << endl;
+    }
     indent(out) << "first = false;" << endl;
 
-    if((*f_iter)->get_req() == t_field::T_OPTIONAL) {
+    if(could_be_unset) {
       indent_down();
       indent(out) << "}" << endl;
     }
+    first = false;
   }
   out <<
     indent() << "sb.append(\")\");" << endl <<
@@ -1852,7 +1849,7 @@
       // Careful, only return _result if not a void function
       if (!(*f_iter)->get_returntype()->is_void()) {
         f_service_ <<
-          indent() << "if (result.__isset.success) {" << endl <<
+          indent() << "if (result.isSetSuccess()) {" << endl <<
           indent() << "  return result.success;" << endl <<
           indent() << "}" << endl;
       }
@@ -1862,7 +1859,7 @@
       vector<t_field*>::const_iterator x_iter;
       for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
         f_service_ <<
-          indent() << "if (result.__isset." << (*x_iter)->get_name() << ") {" << endl <<
+          indent() << "if (result." << (*x_iter)->get_name() << " != null) {" << endl <<
           indent() << "  throw result." << (*x_iter)->get_name() << ";" << endl <<
           indent() << "}" << endl;
       }
@@ -2078,7 +2075,7 @@
   f_service_ << ");" << endl;
 
   // Set isset on success field
-  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void()) {
+  if (!tfunction->is_async() && !tfunction->get_returntype()->is_void() && !type_can_be_null(tfunction->get_returntype())) {
     f_service_ <<
       indent() << "result.__isset.success = true;" << endl;
   }
@@ -2091,8 +2088,7 @@
       if (!tfunction->is_async()) {
         indent_up();
         f_service_ <<
-          indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << ";" << endl <<
-          indent() << "result.__isset." << (*x_iter)->get_name() << " = true;" << endl;
+          indent() << "result." << (*x_iter)->get_name() << " = " << (*x_iter)->get_name() << ";" << endl;
         indent_down();
         f_service_ << indent() << "}";
       } else {
@@ -2948,6 +2944,16 @@
   }
 }
 
+std::string t_java_generator::generate_isset_check(t_field* field) {
+  return "is" + get_cap_name("set") + get_cap_name(field->get_name()) + "()";
+}
+
+void t_java_generator::generate_isset_set(ofstream& out, t_field* field) {
+  if (!type_can_be_null(field->get_type())) {
+    indent(out) << "this.__isset." << field->get_name() << " = true;" << endl;
+  }
+}
+
 
 THRIFT_REGISTER_GENERATOR(java, "Java",
 "    beans:           Generate bean-style output files.\n"

Modified: incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/EqualityTest.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/EqualityTest.java?rev=746000&r1=745999&r2=746000&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/EqualityTest.java (original)
+++ incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/EqualityTest.java Thu Feb 19 21:21:44 2009
@@ -53,6 +53,10 @@
       issets = matrix
       for is_null in nulls:
         for is_set in issets:
+          # isset is implied for non-primitives, so only consider the case
+          # where isset and non-null match.
+          if type != 'int' and list(is_set) != [ not null for null in is_null ]:
+            continue
           for equal in (True, False):
             print >> out
             print >> out, "    lhs = new JavaTestHelper();"
@@ -60,8 +64,8 @@
             print >> out, "    lhs." + option + "_" + type, "=", vals[type][0] + ";"
             print >> out, "    rhs." + option + "_" + type, "=", vals[type][0 if equal else 1] + ";"
             isset_setter = "set" + option[0].upper() + option[1:] + "_" + type + "IsSet"
-            if (is_set[0]): print >> out, "    lhs." + isset_setter + "(true);"
-            if (is_set[1]): print >> out, "    rhs." + isset_setter + "(true);"
+            if (type == 'int' and is_set[0]): print >> out, "    lhs." + isset_setter + "(true);"
+            if (type == 'int' and is_set[1]): print >> out, "    rhs." + isset_setter + "(true);"
             if (is_null[0]): print >> out, "    lhs." + option + "_" + type, "= null;"
             if (is_null[1]): print >> out, "    rhs." + option + "_" + type, "= null;"
             this_present = not is_null[0] and (option == 'req' or is_set[0])
@@ -302,1210 +306,48 @@
     rhs = new JavaTestHelper();
     lhs.req_obj = "foo";
     rhs.req_obj = "foo";
-    rhs.setReq_objIsSet(true);
     lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    rhs.req_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    lhs.req_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    rhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    rhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    rhs.req_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    rhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    rhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "foo";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_obj = "foo";
-    rhs.req_obj = "bar";
-    lhs.setReq_objIsSet(true);
-    rhs.setReq_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    lhs.opt_obj = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    rhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    rhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    rhs.opt_obj = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    rhs.setOpt_objIsSet(true);
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    rhs.setOpt_objIsSet(true);
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "foo";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_obj = "foo";
-    rhs.opt_obj = "bar";
-    lhs.setOpt_objIsSet(true);
-    rhs.setOpt_objIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    rhs.req_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    lhs.req_bin = null;
-    // this_present = False
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    rhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    rhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    rhs.req_bin = null;
-    // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    rhs.setReq_binIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    rhs.setReq_binIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != false)
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{1,2};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    // this_present = True
-    // that_present = True
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.req_bin = new byte[]{1,2};
-    rhs.req_bin = new byte[]{3,4};
-    lhs.setReq_binIsSet(true);
-    rhs.setReq_binIsSet(true);
-    // this_present = True
+    // this_present = False
     // that_present = True
     if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
-      throw new RuntimeException("Failure");
-
-    lhs = new JavaTestHelper();
-    rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
+    lhs.req_obj = "foo";
+    rhs.req_obj = "bar";
+    lhs.req_obj = null;
     // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    // that_present = True
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
+    lhs.req_obj = "foo";
+    rhs.req_obj = "foo";
+    rhs.req_obj = null;
+    // this_present = True
     // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
+    lhs.req_obj = "foo";
+    rhs.req_obj = "bar";
+    rhs.req_obj = null;
+    // this_present = True
     // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
-    // that_present = False
+    lhs.req_obj = "foo";
+    rhs.req_obj = "foo";
+    // this_present = True
+    // that_present = True
     if (lhs.equals(rhs) != true)
       throw new RuntimeException("Failure");
     if (lhs.hashCode() != rhs.hashCode())
@@ -1513,24 +355,19 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    rhs.opt_bin = null;
-    // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    lhs.req_obj = "foo";
+    rhs.req_obj = "bar";
+    // this_present = True
+    // that_present = True
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.opt_bin = null;
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "foo";
+    lhs.opt_obj = null;
+    rhs.opt_obj = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1540,9 +377,10 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.opt_bin = null;
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "bar";
+    lhs.opt_obj = null;
+    rhs.opt_obj = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1552,10 +390,9 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "foo";
+    lhs.opt_obj = null;
     // this_present = False
     // that_present = True
     if (lhs.equals(rhs) != false)
@@ -1563,10 +400,9 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "bar";
+    lhs.opt_obj = null;
     // this_present = False
     // that_present = True
     if (lhs.equals(rhs) != false)
@@ -1574,59 +410,50 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    // this_present = False
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "foo";
+    rhs.opt_obj = null;
+    // this_present = True
     // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    // this_present = False
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "bar";
+    rhs.opt_obj = null;
+    // this_present = True
     // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    // this_present = False
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "foo";
+    // this_present = True
     // that_present = True
-    if (lhs.equals(rhs) != false)
+    if (lhs.equals(rhs) != true)
+      throw new RuntimeException("Failure");
+    if (lhs.hashCode() != rhs.hashCode())
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    lhs.opt_bin = null;
-    // this_present = False
+    lhs.opt_obj = "foo";
+    rhs.opt_obj = "bar";
+    // this_present = True
     // that_present = True
     if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{1,2};
+    lhs.req_bin = null;
+    rhs.req_bin = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1636,9 +463,10 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{3,4};
+    lhs.req_bin = null;
+    rhs.req_bin = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1648,36 +476,29 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    rhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{1,2};
+    lhs.req_bin = null;
     // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    // that_present = True
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    rhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{3,4};
+    lhs.req_bin = null;
     // this_present = False
-    // that_present = False
-    if (lhs.equals(rhs) != true)
-      throw new RuntimeException("Failure");
-    if (lhs.hashCode() != rhs.hashCode())
+    // that_present = True
+    if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = null;
     // this_present = True
     // that_present = False
     if (lhs.equals(rhs) != false)
@@ -1685,10 +506,9 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{3,4};
+    rhs.req_bin = null;
     // this_present = True
     // that_present = False
     if (lhs.equals(rhs) != false)
@@ -1696,25 +516,21 @@
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{1,2};
     // this_present = True
-    // that_present = False
-    if (lhs.equals(rhs) != false)
+    // that_present = True
+    if (lhs.equals(rhs) != true)
+      throw new RuntimeException("Failure");
+    if (lhs.hashCode() != rhs.hashCode())
       throw new RuntimeException("Failure");
 
     lhs = new JavaTestHelper();
     rhs = new JavaTestHelper();
-    lhs.opt_bin = new byte[]{1,2};
-    rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
-    rhs.opt_bin = null;
+    lhs.req_bin = new byte[]{1,2};
+    rhs.req_bin = new byte[]{3,4};
     // this_present = True
-    // that_present = False
+    // that_present = True
     if (lhs.equals(rhs) != false)
       throw new RuntimeException("Failure");
 
@@ -1722,6 +538,8 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{1,2};
+    lhs.opt_bin = null;
+    rhs.opt_bin = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1733,6 +551,8 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{3,4};
+    lhs.opt_bin = null;
+    rhs.opt_bin = null;
     // this_present = False
     // that_present = False
     if (lhs.equals(rhs) != true)
@@ -1744,7 +564,7 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{1,2};
-    rhs.setOpt_binIsSet(true);
+    lhs.opt_bin = null;
     // this_present = False
     // that_present = True
     if (lhs.equals(rhs) != false)
@@ -1754,7 +574,7 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{3,4};
-    rhs.setOpt_binIsSet(true);
+    lhs.opt_bin = null;
     // this_present = False
     // that_present = True
     if (lhs.equals(rhs) != false)
@@ -1764,7 +584,7 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
+    rhs.opt_bin = null;
     // this_present = True
     // that_present = False
     if (lhs.equals(rhs) != false)
@@ -1774,7 +594,7 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
+    rhs.opt_bin = null;
     // this_present = True
     // that_present = False
     if (lhs.equals(rhs) != false)
@@ -1784,8 +604,6 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{1,2};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
     // this_present = True
     // that_present = True
     if (lhs.equals(rhs) != true)
@@ -1797,8 +615,6 @@
     rhs = new JavaTestHelper();
     lhs.opt_bin = new byte[]{1,2};
     rhs.opt_bin = new byte[]{3,4};
-    lhs.setOpt_binIsSet(true);
-    rhs.setOpt_binIsSet(true);
     // this_present = True
     // that_present = True
     if (lhs.equals(rhs) != false)

Modified: incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/ToStringTest.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/ToStringTest.java?rev=746000&r1=745999&r2=746000&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/ToStringTest.java (original)
+++ incubator/thrift/trunk/lib/java/test/org/apache/thrift/test/ToStringTest.java Thu Feb 19 21:21:44 2009
@@ -66,7 +66,7 @@
 
 
     if (!object.toString().equals(
-        "JavaTestHelper(req_int:0, req_obj:, req_bin:, opt_bin:null)")) {
+        "JavaTestHelper(req_int:0, req_obj:, req_bin:)")) {
       throw new RuntimeException();
     } 
   }