Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 640649818
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jun 5, 2024
1 parent b690e72 commit 9f182da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions java/core/src/main/java/com/google/protobuf/TextFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,7 @@ public enum SingularOverwritePolicy {
private final SingularOverwritePolicy singularOverwritePolicy;
private TextFormatParseInfoTree.Builder parseInfoTreeBuilder;
private final int recursionLimit;
private Descriptor rootType;

private Parser(
TypeRegistry typeRegistry,
Expand All @@ -1553,6 +1554,7 @@ private Parser(
this.singularOverwritePolicy = singularOverwritePolicy;
this.parseInfoTreeBuilder = parseInfoTreeBuilder;
this.recursionLimit = recursionLimit;
this.rootType = null;
}

/** Returns a new instance of {@link Builder}. */
Expand Down Expand Up @@ -1754,6 +1756,7 @@ public void merge(
throws ParseException {
final Tokenizer tokenizer = new Tokenizer(input);
MessageReflection.BuilderAdapter target = new MessageReflection.BuilderAdapter(builder);
rootType = target.getDescriptorForType();
List<UnknownField> unknownFields = new ArrayList<UnknownField>();

while (!tokenizer.atEnd()) {
Expand Down

0 comments on commit 9f182da

Please sign in to comment.