aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_helpers.cc8
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_message.cc9
-rw-r--r--src/google/protobuf/compiler/subprocess.h2
-rw-r--r--src/google/protobuf/unittest_extension_nano.proto2
-rw-r--r--src/google/protobuf/unittest_import_nano.proto2
5 files changed, 9 insertions, 14 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) {
diff --git a/src/google/protobuf/compiler/javanano/javanano_message.cc b/src/google/protobuf/compiler/javanano/javanano_message.cc
index 0cf9f97..7a2b4a0 100644
--- a/src/google/protobuf/compiler/javanano/javanano_message.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_message.cc
@@ -501,11 +501,7 @@ void MessageGenerator::GenerateEquals(io::Printer* printer) {
if (params_.store_unknown_fields()) {
printer->Print(
- "if (unknownFieldData == null || unknownFieldData.isEmpty()) {\n"
- " return other.unknownFieldData == null || other.unknownFieldData.isEmpty();"
- "} else {\n"
- " return unknownFieldData.equals(other.unknownFieldData);\n"
- "}\n");
+ "return unknownFieldDataEquals(other);\n");
} else {
printer->Print(
"return true;\n");
@@ -534,8 +530,7 @@ void MessageGenerator::GenerateHashCode(io::Printer* printer) {
if (params_.store_unknown_fields()) {
printer->Print(
- "result = 31 * result + (unknownFieldData == null || unknownFieldData.isEmpty()\n"
- " ? 0 : unknownFieldData.hashCode());\n");
+ "result = 31 * result + unknownFieldDataHashCode();\n");
}
printer->Print("return result;\n");
diff --git a/src/google/protobuf/compiler/subprocess.h b/src/google/protobuf/compiler/subprocess.h
index f9e8ae8..7a6fa70 100644
--- a/src/google/protobuf/compiler/subprocess.h
+++ b/src/google/protobuf/compiler/subprocess.h
@@ -76,7 +76,7 @@ class Subprocess {
#ifdef _WIN32
// Given an error code, returns a human-readable error message. This is
// defined here so that CommandLineInterface can share it.
- static string Subprocess::Win32ErrorMessage(DWORD error_code);
+ static string Win32ErrorMessage(DWORD error_code);
#endif
private:
diff --git a/src/google/protobuf/unittest_extension_nano.proto b/src/google/protobuf/unittest_extension_nano.proto
index 0a775f4..2a678a8 100644
--- a/src/google/protobuf/unittest_extension_nano.proto
+++ b/src/google/protobuf/unittest_extension_nano.proto
@@ -1,7 +1,7 @@
syntax = "proto2";
option java_outer_classname = "Extensions";
-option java_package = "com.google.protobuf.nano";
+option java_package = "com.google.protobuf.nano.testext";
message ExtendableMessage {
optional int32 field = 1;
diff --git a/src/google/protobuf/unittest_import_nano.proto b/src/google/protobuf/unittest_import_nano.proto
index 7813715..0a2fde7 100644
--- a/src/google/protobuf/unittest_import_nano.proto
+++ b/src/google/protobuf/unittest_import_nano.proto
@@ -35,7 +35,7 @@
package protobuf_unittest_import;
// java_package and java_outer_classname are specified on the command line.
-//option java_package = "com.google.protobuf.nano";
+//option java_package = "com.google.protobuf.nano.testimport";
//option java_outer_classname = "UnittestImportNano";
message ImportMessageNano {