diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-24 11:25:15 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-24 11:25:15 -0700 |
commit | 839b180dbae98adf6caa54d0fb87b8d0a43081dc (patch) | |
tree | da56323fb9674fbbff718489b8cd652f499003d5 /src/google/protobuf/compiler/java/java_helpers.h | |
parent | b17ec3ca11ed13cc0d984f6d8be112c246b1994d (diff) | |
download | protobuf-839b180dbae98adf6caa54d0fb87b8d0a43081dc.tar.gz protobuf-839b180dbae98adf6caa54d0fb87b8d0a43081dc.tar.bz2 protobuf-839b180dbae98adf6caa54d0fb87b8d0a43081dc.zip |
Cherry-pick Java utf8 change.
Diffstat (limited to 'src/google/protobuf/compiler/java/java_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_helpers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/java/java_helpers.h b/src/google/protobuf/compiler/java/java_helpers.h index 99ba6a18..7eef86a7 100644 --- a/src/google/protobuf/compiler/java/java_helpers.h +++ b/src/google/protobuf/compiler/java/java_helpers.h @@ -336,6 +336,11 @@ inline bool IsAnyMessage(const Descriptor* descriptor) { return descriptor->full_name() == "google.protobuf.Any"; } +inline bool CheckUtf8(const FieldDescriptor* descriptor) { + return descriptor->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 || + descriptor->file()->options().java_string_check_utf8(); +} + } // namespace java } // namespace compiler } // namespace protobuf |