Skip to content

Commit ae380b4

Browse files
Merge branch '1.15.x'
2 parents 233a050 + 1e3529d commit ae380b4

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ subprojects {
9090
"BadImport",
9191
"ClassCanBeStatic",
9292
"DefaultCharset",
93+
"EqualsGetClass",
9394
"InlineFormatString",
9495
"LongDoubleConversion",
9596
"MissingOverride",

implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/OtlpMetricConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ private String getDescription() {
370370
public boolean equals(Object o) {
371371
if (this == o)
372372
return true;
373-
if (o == null || getClass() != o.getClass())
373+
if (!(o instanceof MetricMetaData))
374374
return false;
375375
MetricMetaData that = (MetricMetaData) o;
376376
return Objects.equals(dataCase, that.dataCase) && Objects.equals(name, that.name)

micrometer-commons/src/main/java/io/micrometer/common/ImmutableKeyValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public String getValue() {
5454
public boolean equals(@Nullable Object o) {
5555
if (this == o)
5656
return true;
57-
if (o == null || getClass() != o.getClass())
57+
if (!(o instanceof ImmutableKeyValue))
5858
return false;
5959
KeyValue that = (KeyValue) o;
6060
return Objects.equals(key, that.getKey()) && Objects.equals(value, that.getValue());

micrometer-core/src/main/java/io/micrometer/core/instrument/ImmutableTag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public String getValue() {
5353
public boolean equals(@Nullable Object o) {
5454
if (this == o)
5555
return true;
56-
if (o == null || getClass() != o.getClass())
56+
if (!(o instanceof ImmutableTag))
5757
return false;
5858
Tag that = (Tag) o;
5959
return Objects.equals(key, that.getKey()) && Objects.equals(value, that.getValue());

micrometer-core/src/main/java/io/micrometer/core/instrument/Meter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public String toString() {
351351
public boolean equals(@Nullable Object o) {
352352
if (this == o)
353353
return true;
354-
if (o == null || getClass() != o.getClass())
354+
if (!(o instanceof Id))
355355
return false;
356356
Meter.Id meterId = (Meter.Id) o;
357357
return name.equals(meterId.name) && tags.equals(meterId.tags);

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jersey/server/ObservationRequestEventListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public boolean equals(Object o) {
123123
if (this == o) {
124124
return true;
125125
}
126-
if (o == null || getClass() != o.getClass()) {
126+
if (!(o instanceof ObservationScopeAndContext)) {
127127
return false;
128128
}
129129
ObservationScopeAndContext that = (ObservationScopeAndContext) o;

micrometer-core/src/test/java/io/micrometer/core/instrument/binder/hystrix/MicrometerMetricsPublisherThreadPoolTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public boolean equals(final Object o) {
131131
if (this == o) {
132132
return true;
133133
}
134-
if (o == null || getClass() != o.getClass()) {
134+
if (!(o instanceof MeterId)) {
135135
return false;
136136
}
137137
final MeterId meterId = (MeterId) o;

micrometer-test/src/main/java/io/micrometer/common/util/internal/logging/LogEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Throwable getCause() {
5858
public boolean equals(Object o) {
5959
if (this == o)
6060
return true;
61-
if (o == null || getClass() != o.getClass())
61+
if (!(o instanceof LogEvent))
6262
return false;
6363
LogEvent logEvent = (LogEvent) o;
6464
return level == logEvent.level && Objects.equals(message, logEvent.message)

micrometer-test/src/main/java/io/micrometer/core/util/internal/logging/LogEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public Throwable getCause() {
6161
public boolean equals(Object o) {
6262
if (this == o)
6363
return true;
64-
if (o == null || getClass() != o.getClass())
64+
if (!(o instanceof LogEvent))
6565
return false;
6666
LogEvent logEvent = (LogEvent) o;
6767
return level == logEvent.level && Objects.equals(message, logEvent.message)

0 commit comments

Comments
 (0)