| Index: third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
|
| index 7d21fe617c870f6d1c8375d6920c716688d33e33..0a112888c0bca3623ea44f71f0f281d2a6b4e6b7 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc
|
| @@ -43,7 +43,7 @@ namespace compiler {
|
| namespace java {
|
|
|
| Context::Context(const FileDescriptor* file)
|
| - : name_resolver_(new ClassNameResolver) {
|
| + : name_resolver_(new ClassNameResolver), enforce_lite_(false) {
|
| InitializeFieldGeneratorInfo(file);
|
| }
|
|
|
| @@ -189,6 +189,13 @@ const OneofGeneratorInfo* Context::GetOneofGeneratorInfo(
|
| return result;
|
| }
|
|
|
| +// Does this message class have generated parsing, serialization, and other
|
| +// standard methods for which reflection-based fallback implementations exist?
|
| +bool Context::HasGeneratedMethods(const Descriptor* descriptor) const {
|
| + return enforce_lite_ || descriptor->file()->options().optimize_for() !=
|
| + FileOptions::CODE_SIZE;
|
| +}
|
| +
|
| } // namespace java
|
| } // namespace compiler
|
| } // namespace protobuf
|
|
|