Skip to content

Commit 8a976dc

Browse files
committed
Merge branch '1.9.x' into 1.10.x
2 parents e7605c4 + ec46544 commit 8a976dc

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

implementations/micrometer-registry-dynatrace/src/main/java/io/micrometer/dynatrace/types/DynatraceSummarySnapshotSupport.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
public interface DynatraceSummarySnapshotSupport {
2727

2828
/**
29-
* @deprecated This method might lead to problems with a race condition if values are
30-
* added to the summary after reading the number of values already recorded. Take a
31-
* snapshot and use {@link DynatraceSummarySnapshot#getCount()} instead.
29+
* @deprecated since 1.9.8. This method might lead to problems with a race condition
30+
* if values are added to the summary after reading the number of values already
31+
* recorded. Take a snapshot and use {@link DynatraceSummarySnapshot#getCount()}
32+
* instead.
3233
*/
33-
@Deprecated()
34+
@Deprecated
3435
boolean hasValues();
3536

3637
DynatraceSummarySnapshot takeSummarySnapshot();

implementations/micrometer-registry-dynatrace/src/test/java/io/micrometer/dynatrace/types/DynatraceDistributionSummaryTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void testDynatraceDistributionSummary_NegativeValuesAreIgnored() {
7272
ds.record(-1.23);
7373
ds.record(-100.3);
7474

75-
assertMinMaxSumCount(ds, 0., 0., 0., 0);
75+
assertMinMaxSumCount(ds, 0.0, 0.0, 0.0, 0);
7676
}
7777

7878
@Test
@@ -81,7 +81,7 @@ void testDynatraceDistributionSummary_NaNValuesAreIgnored() {
8181

8282
ds.record(Double.NaN);
8383

84-
assertMinMaxSumCount(ds, 0., 0., 0., 0);
84+
assertMinMaxSumCount(ds, 0.0, 0.0, 0.0, 0);
8585
}
8686

8787
@Test

implementations/micrometer-registry-dynatrace/src/test/java/io/micrometer/dynatrace/types/DynatraceTimerTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ void testTimerCount() {
6262

6363
timer.takeSummarySnapshotAndReset(BASE_TIME_UNIT);
6464
assertThat(timer.count()).isZero();
65-
6665
}
6766

6867
@Test
@@ -140,7 +139,7 @@ void testConvertIfNecessary() {
140139
TimeUnit unit = TimeUnit.MILLISECONDS;
141140
DynatraceTimer timer = new DynatraceTimer(ID, CLOCK, DISTRIBUTION_STATISTIC_CONFIG, PAUSE_DETECTOR, unit);
142141

143-
DynatraceSummarySnapshot snapshot = new DynatraceSummarySnapshot(1000., 2000., 3000., 2);
142+
DynatraceSummarySnapshot snapshot = new DynatraceSummarySnapshot(1000.0, 2000.0, 3000.0, 2);
144143
DynatraceSummarySnapshot unconverted = timer.convertIfNecessary(snapshot, unit);
145144
assertThat(unconverted).isEqualTo(snapshot);
146145

implementations/micrometer-registry-dynatrace/src/test/java/io/micrometer/dynatrace/v1/DynatraceExporterV1Test.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,11 @@ void trySendHttpRequestThrows() throws Throwable {
495495
verify(reqBuilder).send();
496496
// assert that an error is logged that does not contain the token.
497497
assertThat(LOGGER.getLogEvents()).hasSize(1).extracting(LogEvent::getMessage)
498-
.containsExactlyInAnyOrder("failed to send metrics to Dynatrace").noneMatch(x -> x.contains(apiToken));
498+
.containsExactly("failed to send metrics to Dynatrace").noneMatch(x -> x.contains(apiToken));
499499
}
500500

501501
private DynatraceExporterV1 getDynatraceExporterV1(HttpSender httpClient, String url, String apiToken) {
502-
DynatraceExporterV1 exporter = FACTORY.injectLogger(() -> new DynatraceExporterV1(new DynatraceConfig() {
502+
return FACTORY.injectLogger(() -> new DynatraceExporterV1(new DynatraceConfig() {
503503
@Override
504504
public String get(String key) {
505505
return null;
@@ -515,7 +515,6 @@ public String uri() {
515515
return url;
516516
}
517517
}, clock, httpClient));
518-
return exporter;
519518
}
520519

521520
private DynatraceExporterV1 createExporter(HttpSender httpClient) {

micrometer-core/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ dependencies {
150150
exclude group: "org.slf4j", module: "jcl-over-slf4j"
151151
}
152152
testImplementation("org.apache.maven.resolver:maven-resolver-connector-basic:latest.release")
153-
testImplementation("org.springframework:spring-core")
154-
155153
// gRPC
156154
testImplementation("io.grpc:grpc-core")
157155
testImplementation("io.grpc:grpc-testing-proto")

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/MicrometerHttpRequestExecutor.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ public Builder observationConvention(ApacheHttpClientObservationConvention conve
241241
}
242242

243243
/**
244-
* @return Creates an instance of {@link MicrometerHttpRequestExecutor} with all
245-
* the configured properties.
244+
* Creates an instance of {@link MicrometerHttpRequestExecutor} with all the
245+
* configured properties.
246+
* @return an instance of {@link MicrometerHttpRequestExecutor}
246247
*/
247248
public MicrometerHttpRequestExecutor build() {
248249
return new MicrometerHttpRequestExecutor(waitForContinue, registry, uriMapper, extraTags,

micrometer-core/src/test/java/io/micrometer/core/instrument/composite/CompositeMeterRegistryTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void namingConventions() {
150150
void commonTags() {
151151
simple.config().commonTags("instance", "local"); // added alongside other common
152152
// tags in the composite
153-
simple.config().commonTags("region", "us-west-1"); // overriden by the composite
153+
simple.config().commonTags("region", "us-west-1"); // overridden by the composite
154154

155155
composite.config().commonTags("region", "us-east-1");
156156
composite.add(simple);

0 commit comments

Comments
 (0)