Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2025 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

package com.google.protobuf;

import static com.google.protobuf.Internal.checkNotNull;

final class BuiltinExtensionRegistry {

private static volatile ExtensionRegistry instance = null;

static ExtensionRegistry getInstance() {
ExtensionRegistry instance = BuiltinExtensionRegistry.instance;
if (instance == null) {
synchronized (BuiltinExtensionRegistry.class) {
instance = BuiltinExtensionRegistry.instance;
if (instance == null) {
instance = ExtensionRegistry.newInstance();
instance.add(checkNotNull(JavaFeaturesProto.java_));
instance = instance.getUnmodifiable();
BuiltinExtensionRegistry.instance = instance;
}
}
}
return instance;
}

private BuiltinExtensionRegistry() {}
}
Loading
Loading