Turn on version checks for Java Lite enum in OSS.

PiperOrigin-RevId: 600579323
pull/15532/head
Protobuf Team Bot 10 months ago committed by Copybara-Service
parent 0d090df3e2
commit 59c02715bd
  1. 10
      src/google/protobuf/compiler/java/enum_lite.cc

@ -85,6 +85,16 @@ void EnumLiteGenerator::Generate(io::Printer* printer) {
// ----------------------------------------------------------------- // -----------------------------------------------------------------
if (context_->options().opensource_runtime) {
printer->Print("static {\n");
printer->Indent();
PrintGencodeVersionValidator(printer,
context_->options().opensource_runtime,
context_->EnforceLite(), descriptor_->name());
printer->Outdent();
printer->Print("}\n");
}
for (int i = 0; i < aliases_.size(); i++) { for (int i = 0; i < aliases_.size(); i++) {
absl::flat_hash_map<absl::string_view, std::string> vars; absl::flat_hash_map<absl::string_view, std::string> vars;
vars["classname"] = descriptor_->name(); vars["classname"] = descriptor_->name();

Loading…
Cancel
Save