Skip to content

Commit

Permalink
fix: avoid null in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
manikmagar committed Jan 31, 2024
1 parent a414686 commit ac17c45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.opentelemetry.instrumentation.oshi.AbstractProcessMetricsTest;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -18,7 +19,7 @@ class ProcessMetricsTest extends AbstractProcessMetricsTest {

@Override
protected List<AutoCloseable> registerMetrics() {
return null;
return Collections.emptyList();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.opentelemetry.instrumentation.oshi.AbstractSystemMetricsTest;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -18,7 +19,7 @@ class SystemMetricsTest extends AbstractSystemMetricsTest {

@Override
protected List<AutoCloseable> registerMetrics() {
return null;
return Collections.emptyList();
}

@Override
Expand Down

0 comments on commit ac17c45

Please sign in to comment.