Skip to content

Commit

Permalink
Turn on version checks for Java Lite enum in OSS.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 600579323
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jan 22, 2024
1 parent 0d090df commit 59c0271
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/google/protobuf/compiler/java/enum_lite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
absl::flat_hash_map<absl::string_view, std::string> vars;
vars["classname"] = descriptor_->name();
Expand Down

0 comments on commit 59c0271

Please sign in to comment.