From ca0c631ddcc2e76f8b986adf9bb34b4f5eab81ae Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Wed, 14 Aug 2024 16:14:12 -0700 Subject: [PATCH] Skip a volatile read. PiperOrigin-RevId: 663089904 --- .../main/java/com/google/protobuf/ExtensionRegistryLite.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java b/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java index 6529071e24..46a13b4b9d 100644 --- a/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java +++ b/java/core/src/main/java/com/google/protobuf/ExtensionRegistryLite.java @@ -104,7 +104,7 @@ public class ExtensionRegistryLite { synchronized (ExtensionRegistryLite.class) { result = emptyRegistry; if (result == null) { - result = emptyRegistry = ExtensionRegistryFactory.createEmpty(); + emptyRegistry = result = ExtensionRegistryFactory.createEmpty(); } } }