From db56814c57160fb8ae18f58b00e054655c06b540 Mon Sep 17 00:00:00 2001 From: Marius Volkhart Date: Fri, 30 Oct 2020 15:20:06 +0100 Subject: [PATCH] Remove ComponentRegistry#get(String) overload This overload is not no longer used by our code. --- .../sdk/internal/ComponentRegistry.java | 12 ------------ .../sdk/internal/ComponentRegistryTest.java | 7 ------- 2 files changed, 19 deletions(-) diff --git a/sdk/common/src/main/java/io/opentelemetry/sdk/internal/ComponentRegistry.java b/sdk/common/src/main/java/io/opentelemetry/sdk/internal/ComponentRegistry.java index 2d612abfc80..c9182da3cfe 100644 --- a/sdk/common/src/main/java/io/opentelemetry/sdk/internal/ComponentRegistry.java +++ b/sdk/common/src/main/java/io/opentelemetry/sdk/internal/ComponentRegistry.java @@ -22,18 +22,6 @@ public abstract class ComponentRegistry { private final ConcurrentMap registry = new ConcurrentHashMap<>(); - /** - * Returns the registered value associated with this name and {@code null} version if any, - * otherwise creates a new instance and associates it with the given name and {@code null} - * version. - * - * @param instrumentationName the name of the instrumentation library. - * @return the registered value associated with this name and {@code null} version. - */ - public final V get(String instrumentationName) { - return get(instrumentationName, null); - } - /** * Returns the registered value associated with this name and version if any, otherwise creates a * new instance and associates it with the given name and version. diff --git a/sdk/common/src/test/java/io/opentelemetry/sdk/internal/ComponentRegistryTest.java b/sdk/common/src/test/java/io/opentelemetry/sdk/internal/ComponentRegistryTest.java index 6f22313a49a..ee88c8394c8 100644 --- a/sdk/common/src/test/java/io/opentelemetry/sdk/internal/ComponentRegistryTest.java +++ b/sdk/common/src/test/java/io/opentelemetry/sdk/internal/ComponentRegistryTest.java @@ -37,13 +37,6 @@ void libraryVersion_AllowsNull() { assertThat(testComponent.instrumentationLibraryInfo.getVersion()).isNull(); } - @Test - void getSameInstanceForSameName_WithoutVersion() { - assertThat(registry.get(INSTRUMENTATION_NAME)).isSameAs(registry.get(INSTRUMENTATION_NAME)); - assertThat(registry.get(INSTRUMENTATION_NAME)) - .isSameAs(registry.get(INSTRUMENTATION_NAME, null)); - } - @Test void getSameInstanceForSameName_WithVersion() { assertThat(registry.get(INSTRUMENTATION_NAME, INSTRUMENTATION_VERSION))