aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/javanano/javanano_file.cc
diff options
context:
space:
mode:
authorGravatar Jie Dai <jied@google.com>2014-04-21 14:29:03 -0700
committerGravatar Diego García <xaethos@google.com>2014-04-23 09:27:07 -0700
commitd9425a621844065d5a5535448ebe801bad2df56b (patch)
treec3716ae0d3bda52eb181078361ea0cda05ec2b41 /src/google/protobuf/compiler/javanano/javanano_file.cc
parent56cba8eeae57043aa507c13b190ab16015872135 (diff)
Adds --ignore_service nano proto compiler flag
Nano proto compiler normally throws an error if any service is defined. If --ignore-services=true is set, no error is thrown and the service is simply skipped. Change-Id: Id82583555085cc55550d03a485d3f0189885240b
Diffstat (limited to 'src/google/protobuf/compiler/javanano/javanano_file.cc')
-rw-r--r--src/google/protobuf/compiler/javanano/javanano_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/javanano/javanano_file.cc b/src/google/protobuf/compiler/javanano/javanano_file.cc
index bdc51c4e..98586b48 100644
--- a/src/google/protobuf/compiler/javanano/javanano_file.cc
+++ b/src/google/protobuf/compiler/javanano/javanano_file.cc
@@ -105,7 +105,7 @@ bool FileGenerator::Validate(string* error) {
return false;
}
- if (file_->service_count() != 0) {
+ if (file_->service_count() != 0 && !params_.ignore_services()) {
error->assign(file_->name());
error->append(
": Java NANO_RUNTIME does not support services\"");