Skip to content

Commit

Permalink
Remove ComponentRegistry#get(String) overload
Browse files Browse the repository at this point in the history
This overload is not no longer used by our code.
  • Loading branch information
MariusVolkhart committed Nov 1, 2020
1 parent 4b28eaf commit db56814
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public abstract class ComponentRegistry<V> {

private final ConcurrentMap<InstrumentationLibraryInfo, V> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit db56814

Please sign in to comment.