Automated rollback of commit dfd7784fa1.

PiperOrigin-RevId: 672639698
pull/18195/head
Protobuf Team Bot 5 months ago committed by Copybara-Service
parent 9efb6064a9
commit 301740dd06
  1. 3
      src/google/protobuf/compiler/java/lite/enum_field.cc
  2. 3
      src/google/protobuf/compiler/java/lite/message_field.cc

@ -111,8 +111,7 @@ void SetEnumVariables(
// We use `x.getClass()` as a null check because it generates less bytecode
// than an `if (x == null) { throw ... }` statement.
(*variables)["null_check"] =
"java.lang.Class<?> unusedValueClass = value.getClass();\n";
(*variables)["null_check"] = "value.getClass();\n";
// Calls to Annotate() use variable ranges to know which text to annotate.
(*variables)["{"] = "";
(*variables)["}"] = "";

@ -88,8 +88,7 @@ void SetMessageVariables(
// We use `x.getClass()` as a null check because it generates less bytecode
// than an `if (x == null) { throw ... }` statement.
(*variables)["null_check"] =
"java.lang.Class<?> unusedValueClass = value.getClass();\n";
(*variables)["null_check"] = "value.getClass();\n";
// Annotations often use { and } to determine ranges.
(*variables)["{"] = "";
(*variables)["}"] = "";

Loading…
Cancel
Save