Skip to content

Commit 3cb20bc

Browse files
committed
Narrow @SuppressWarnings("unchecked") to the single offending statement
1 parent 8d867a2 commit 3cb20bc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsBaseTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ protected boolean isSqsAttributeInjectionEnabled() {
119119
}
120120

121121
@BeforeAll
122-
@SuppressWarnings("unchecked")
123122
void setUp() {
124123
sqs = SQSRestServerBuilder.withPort(0).withInterface("localhost").start();
125124
Http.ServerBinding server = sqs.waitUntilStarted();
@@ -138,7 +137,8 @@ void setUp() {
138137
.queueUrl(queueUrl)
139138
.messageBody("{\"type\": \"hello\"}")
140139
.build();
141-
sendMessageBatchRequest =
140+
@SuppressWarnings("unchecked")
141+
SendMessageBatchRequest batch =
142142
SendMessageBatchRequest.builder()
143143
.queueUrl(queueUrl)
144144
.entries(
@@ -148,6 +148,7 @@ void setUp() {
148148
// 10 attributes, injection with custom propagator never possible
149149
e -> e.messageBody("e3").id("i3").messageAttributes(dummyMessageAttributes(10)))
150150
.build();
151+
sendMessageBatchRequest = batch;
151152
}
152153

153154
@AfterAll

0 commit comments

Comments
 (0)