File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
compiler/src/java_plugin/cpp Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 23
23
24
24
#include " java_generator.h"
25
25
#include < google/protobuf/compiler/code_generator.h>
26
+ #if GOOGLE_PROTOBUF_VERSION >= 5027000
27
+ #include < google/protobuf/compiler/java/java_features.pb.h>
28
+ #endif
26
29
#include < google/protobuf/compiler/plugin.h>
27
30
#include < google/protobuf/descriptor.h>
28
31
#include < google/protobuf/io/zero_copy_stream.h>
@@ -57,6 +60,10 @@ class JavaGrpcGenerator : public protobuf::compiler::CodeGenerator {
57
60
protobuf::Edition GetMaximumEdition () const override {
58
61
return protobuf::Edition::EDITION_2023;
59
62
}
63
+ std::vector<const protobuf::FieldDescriptor*> GetFeatureExtensions ()
64
+ const override {
65
+ return {GetExtensionReflection (pb::java)};
66
+ }
60
67
#else
61
68
uint64_t GetSupportedFeatures () const override {
62
69
return Feature::FEATURE_PROTO3_OPTIONAL;
You can’t perform that action at this time.
0 commit comments