aboutsummaryrefslogtreecommitdiffstats
path: root/src/google/protobuf/compiler/javanano/javanano_helpers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_helpers.cc')
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_helpers.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_helpers.cc b/src/google/protobuf/compiler/javanano/javanano_helpers.cc
index 2149418..e8326a4 100644
--- a/src/google/protobuf/compiler/javanano/javanano_helpers.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_helpers.cc
@@ -336,14 +336,14 @@ string PrimitiveTypeName(JavaType type) {
case JAVATYPE_STRING : return "java.lang.String";
case JAVATYPE_BYTES : return "byte[]";
case JAVATYPE_ENUM : return "int";
- case JAVATYPE_MESSAGE: return "";
+ case JAVATYPE_MESSAGE: return NULL;
// No default because we want the compiler to complain if any new
// JavaTypes are added.
}
GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
+ return NULL;
}
string BoxedPrimitiveTypeName(JavaType type) {
@@ -356,14 +356,14 @@ string BoxedPrimitiveTypeName(JavaType type) {
case JAVATYPE_STRING : return "java.lang.String";
case JAVATYPE_BYTES : return "byte[]";
case JAVATYPE_ENUM : return "java.lang.Integer";
- case JAVATYPE_MESSAGE: return "";
+ case JAVATYPE_MESSAGE: return NULL;
// No default because we want the compiler to complain if any new
// JavaTypes are added.
}
GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
+ return NULL;
}
string EmptyArrayName(const Params& params, const FieldDescriptor* field) {
@@ -392,10 +392,6 @@ string DefaultValue(const Params& params, const FieldDescriptor* field) {
}
if (params.use_reference_types_for_primitives()) {
- if (params.reftypes_primitive_enums()
- && field->cpp_type() == FieldDescriptor::CPPTYPE_ENUM) {
- return "Integer.MIN_VALUE";
- }
return "null";
}