java_gen: add support for object hashing via the guava hash API
diff --git a/java_gen/java_model.py b/java_gen/java_model.py
index 81ce8fe..96ba163 100644
--- a/java_gen/java_model.py
+++ b/java_gen/java_model.py
@@ -983,9 +983,9 @@
     @property
     def priv_value(self):
         if self.name == "version":
-            return self.msg.version.int_version
+            return self.java_type.format_value(self.msg.version.int_version, pub_type=False)
         elif self.name == "length" or self.name == "len":
-            return self.msg.length
+            return self.java_type.format_value(self.msg.length, pub_type=False)
         else:
             return self.java_type.format_value(self.member.value, pub_type=False)