Skip to content

Commit

Permalink
fix errorprone
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Jan 10, 2022
1 parent 1ff3b2e commit bbcd54d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.opentelemetry.api.metrics.DoubleCounter;
import io.opentelemetry.api.metrics.Meter;
import java.util.Collections;
import javax.annotation.Nullable;

@SuppressWarnings("HashCodeToString")
final class OpenTelemetryCounter implements Counter, RemovableMeter {
Expand Down Expand Up @@ -71,7 +72,7 @@ public void onRemove() {

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
return MeterEquivalence.equals(this, o);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.opentelemetry.api.common.Attributes;
import java.util.Collections;
import java.util.function.ToDoubleFunction;
import javax.annotation.Nullable;

@SuppressWarnings("HashCodeToString")
final class OpenTelemetryFunctionCounter<T> implements FunctionCounter, RemovableMeter {
Expand Down Expand Up @@ -57,7 +58,7 @@ public void onRemove() {

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
return MeterEquivalence.equals(this, o);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.concurrent.TimeUnit;
import java.util.function.ToDoubleFunction;
import java.util.function.ToLongFunction;
import javax.annotation.Nullable;

@SuppressWarnings("HashCodeToString")
final class OpenTelemetryFunctionTimer<T> implements FunctionTimer, RemovableMeter {
Expand Down Expand Up @@ -100,7 +101,7 @@ public void onRemove() {

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
return MeterEquivalence.equals(this, o);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void onRemove() {

@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
return MeterEquivalence.equals(this, o);
}

Expand Down

0 comments on commit bbcd54d

Please sign in to comment.