Call ExtensionRegistry.add for JavaFeaturesProto.java directly.
PiperOrigin-RevId: 601200193
diff --git a/java/core/src/main/java/com/google/protobuf/Descriptors.java b/java/core/src/main/java/com/google/protobuf/Descriptors.java
index dff3228..76412aa 100644
--- a/java/core/src/main/java/com/google/protobuf/Descriptors.java
+++ b/java/core/src/main/java/com/google/protobuf/Descriptors.java
@@ -87,7 +87,7 @@
if (javaEditionDefaults == null) {
try {
ExtensionRegistry registry = ExtensionRegistry.newInstance();
- JavaFeaturesProto.registerAllExtensions(registry);
+ registry.add(JavaFeaturesProto.java);
javaEditionDefaults =
FeatureSetDefaults.parseFrom(
JavaEditionDefaults.PROTOBUF_INTERNAL_JAVA_EDITION_DEFAULTS.getBytes(