Skip to content

Commit 2b0eab5

Browse files
committed
deal with new errorprone arrays-for-varargs constraints
1 parent 96cf3a0 commit 2b0eab5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

api/all/src/test/java/io/opentelemetry/api/common/AttributesTest.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,14 @@ void nullsAreNoOps() {
421421
builder.put("long", 10);
422422
builder.put("double", 1.0);
423423
builder.put("bool", true);
424-
builder.put("arrayString", new String[] {"string"});
425-
builder.put("arrayLong", new long[] {10L});
426-
builder.put("arrayDouble", new double[] {1.0});
427-
builder.put("arrayBool", new boolean[] {true});
424+
String[] strings = {"string"};
425+
builder.put("arrayString", strings);
426+
long[] longs = {10L};
427+
builder.put("arrayLong", longs);
428+
double[] doubles = {1.0};
429+
builder.put("arrayDouble", doubles);
430+
boolean[] booleans = {true};
431+
builder.put("arrayBool", booleans);
428432
assertThat(builder.build().size()).isEqualTo(9);
429433

430434
// note: currently these are no-op calls; that behavior is not required, so if it needs to

0 commit comments

Comments
 (0)