Skip to content

Commit 2457741

Browse files
committed
Fix NullAway issues
1 parent 88a55b8 commit 2457741

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public Builder publishPercentileHistogram(@Nullable Boolean enabled) {
244244
* then.
245245
*/
246246
@Deprecated
247-
public Builder sla(@Nullable long... sla) {
247+
public Builder sla(long @Nullable ... sla) {
248248
return sla == null ? this : serviceLevelObjectives(Arrays.stream(sla).asDoubleStream().toArray());
249249
}
250250

@@ -266,7 +266,7 @@ public Builder sla(@Nullable long... sla) {
266266
* then.
267267
*/
268268
@Deprecated
269-
public Builder sla(@Nullable double... sla) {
269+
public Builder sla(double @Nullable ... sla) {
270270
this.distributionConfigBuilder.serviceLevelObjectives(sla);
271271
return this;
272272
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public static Tags concat(@Nullable Iterable<? extends Tag> tags, @Nullable Iter
322322
* @param keyValues the additional key/value pairs to add, elements mustn't be null
323323
* @return the merged tags
324324
*/
325-
public static Tags concat(@Nullable Iterable<? extends Tag> tags, @Nullable String... keyValues) {
325+
public static Tags concat(@Nullable Iterable<? extends Tag> tags, String @Nullable ... keyValues) {
326326
return Tags.of(tags).and(keyValues);
327327
}
328328

micrometer-core/src/test/java/io/micrometer/core/instrument/TagsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void concatOnTwoTagsWithSameKeyAreMergedIntoOneTag() {
147147
@Test
148148
void concatWhenKeyValuesAreNullShouldReturnCurrentInstance() {
149149
Tags source = Tags.of("k", "v1");
150-
Tags concatenated = Tags.concat(source, (String) null);
150+
Tags concatenated = Tags.concat(source, (String[]) null);
151151
assertThat(source).isSameAs(concatenated);
152152
}
153153

0 commit comments

Comments
 (0)