aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Duff <bduff@google.com>2015-03-20 23:14:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-20 23:14:03 +0000
commitf210028d834fa773c0fb590bc992ed49de192f23 (patch)
treece16372e5f2e70e255bb6ba630d1901fc87c0981
parent6ba3235f63c0de70702d684e7c5f15c5f20f16fa (diff)
parentf9b409e35963a357985ee687d096f8c166e0b80e (diff)
downloadexternal_protobuf-f210028d834fa773c0fb590bc992ed49de192f23.zip
external_protobuf-f210028d834fa773c0fb590bc992ed49de192f23.tar.gz
external_protobuf-f210028d834fa773c0fb590bc992ed49de192f23.tar.bz2
am f9b409e3: am 95d99df4: Merge "Don\'t return NULL from {Boxed}PrimitiveTypeName."
* commit 'f9b409e35963a357985ee687d096f8c166e0b80e': Don't return NULL from {Boxed}PrimitiveTypeName.
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_helpers.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_helpers.cc b/src/google/protobuf/compiler/javanano/javanano_helpers.cc
index e8326a4..bf88f25 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 NULL;
+ case JAVATYPE_MESSAGE: return "";
// No default because we want the compiler to complain if any new
// JavaTypes are added.
}
GOOGLE_LOG(FATAL) << "Can't get here.";
- return NULL;
+ return "";
}
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 NULL;
+ case JAVATYPE_MESSAGE: return "";
// No default because we want the compiler to complain if any new
// JavaTypes are added.
}
GOOGLE_LOG(FATAL) << "Can't get here.";
- return NULL;
+ return "";
}
string EmptyArrayName(const Params& params, const FieldDescriptor* field) {