From 3924ea28cc47b901b1c6c580ed5d22613f0a0676 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 2 Feb 2024 10:45:38 -0800 Subject: [PATCH] Automated rollback of commit 531d4372f4ebe92dcbe8a921c7d2f97a16dd8be5. PiperOrigin-RevId: 603728275 --- .../main/java/com/google/protobuf/GeneratedMessage.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java b/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java index 1ed3add663..35381aaea5 100644 --- a/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java +++ b/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java @@ -33,7 +33,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.SortedMap; import java.util.TreeMap; /** @@ -136,9 +135,7 @@ public abstract class GeneratedMessage extends AbstractMessage implements Serial */ private Map getAllFieldsMutable(boolean getBytesForString) { final TreeMap result = new TreeMap<>(); - final FieldAccessorTable fieldAccessorTable = internalGetFieldAccessorTable(); - - final Descriptor descriptor = fieldAccessorTable.descriptor; + final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; final List fields = descriptor.getFields(); for (int i = 0; i < fields.size(); i++) { @@ -564,8 +561,7 @@ public abstract class GeneratedMessage extends AbstractMessage implements Serial /** Internal helper which returns a mutable map. */ private Map getAllFieldsMutable() { final TreeMap result = new TreeMap<>(); - final FieldAccessorTable fieldAccessorTable = internalGetFieldAccessorTable(); - final Descriptor descriptor = fieldAccessorTable.descriptor; + final Descriptor descriptor = internalGetFieldAccessorTable().descriptor; final List fields = descriptor.getFields(); for (int i = 0; i < fields.size(); i++) { @@ -2061,6 +2057,7 @@ public abstract class GeneratedMessage extends AbstractMessage implements Serial oneofs[i] = new SyntheticOneofAccessor(descriptor, i); } } + initialized = true; camelCaseNames = null; return this;