Skip a volatile read.

PiperOrigin-RevId: 663089904
pull/17759/head
Protobuf Team Bot 3 months ago committed by Copybara-Service
parent b2a38a7b97
commit ca0c631ddc
  1. 2
      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();
}
}
}

Loading…
Cancel
Save