Skip to content

Commit 81b2038

Browse files
committed
Remove unused imports
1 parent 870b82c commit 81b2038

File tree

15 files changed

+851
-836
lines changed

15 files changed

+851
-836
lines changed

boms/test-utils/src/main/java/io/a2a/bom/test/DynamicBomVerifier.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import java.util.*;
88
import java.util.regex.Matcher;
99
import java.util.regex.Pattern;
10-
import java.util.stream.Collectors;
1110
import java.util.stream.Stream;
1211

1312
/**

client/base/src/main/java/io/a2a/A2A.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import java.util.Collections;
44
import java.util.List;
55
import java.util.Map;
6-
import java.util.UUID;
76

87
import io.a2a.client.http.A2ACardResolver;
98
import io.a2a.client.http.A2AHttpClient;

client/transport/rest/src/main/java/io/a2a/client/transport/rest/sse/RestSSEEventListener.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package io.a2a.client.transport.rest.sse;
22

3-
import static io.a2a.grpc.StreamResponse.PayloadCase.ARTIFACT_UPDATE;
4-
import static io.a2a.grpc.StreamResponse.PayloadCase.MSG;
5-
import static io.a2a.grpc.StreamResponse.PayloadCase.STATUS_UPDATE;
6-
import static io.a2a.grpc.StreamResponse.PayloadCase.TASK;
7-
83
import java.util.concurrent.Future;
94
import java.util.function.Consumer;
105
import java.util.logging.Logger;
@@ -62,7 +57,8 @@ private void handleMessage(StreamResponse response) {
6257
event = ProtoUtils.FromProto.taskArtifactUpdateEvent(response.getArtifactUpdate());
6358
default -> {
6459
log.warning("Invalid stream response " + response.getPayloadCase());
65-
errorHandler.accept(new IllegalStateException("Invalid stream response from server: " + response.getPayloadCase()));
60+
errorHandler.accept(
61+
new IllegalStateException("Invalid stream response from server: " + response.getPayloadCase()));
6662
return;
6763
}
6864
}

examples/helloworld/client/src/main/java/io/a2a/examples/helloworld/HelloWorldClient.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import io.a2a.A2A;
1313

1414
import io.a2a.client.Client;
15-
import io.a2a.client.ClientBuilder;
1615
import io.a2a.client.ClientEvent;
1716
import io.a2a.client.MessageEvent;
1817
import io.a2a.client.http.A2ACardResolver;

extras/task-store-database-jpa/src/main/java/io/a2a/extras/taskstore/database/jpa/JpaDatabaseTaskStore.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import java.time.Duration;
44
import java.time.Instant;
55
import java.util.ArrayList;
6-
import java.util.Comparator;
76
import java.util.List;
8-
import java.util.stream.Stream;
97

108
import jakarta.annotation.Priority;
119
import jakarta.enterprise.context.ApplicationScoped;

reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2ATestRoutes.java

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.a2a.server.rest.quarkus;
22

3-
import io.a2a.server.rest.quarkus.A2AServerRoutes;
4-
53
import static io.vertx.core.http.HttpHeaders.CONTENT_TYPE;
64
import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON;
75
import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN;
@@ -41,28 +39,29 @@ public void init() {
4139
A2AServerRoutes.setStreamingMultiSseSupportSubscribedRunnable(() -> streamingSubscribedCount.incrementAndGet());
4240
}
4341

44-
45-
@Route(path = "/test/task", methods = {Route.HttpMethod.POST}, consumes = {APPLICATION_JSON}, type = Route.HandlerType.BLOCKING)
42+
@Route(path = "/test/task", methods = { Route.HttpMethod.POST }, consumes = {
43+
APPLICATION_JSON }, type = Route.HandlerType.BLOCKING)
4644
public void saveTask(@Body String body, RoutingContext rc) {
4745
try {
4846
Task task = Utils.OBJECT_MAPPER.readValue(body, Task.class);
4947
testUtilsBean.saveTask(task);
5048
rc.response()
51-
.setStatusCode(200)
52-
.end();
49+
.setStatusCode(200)
50+
.end();
5351
} catch (Throwable t) {
5452
errorResponse(t, rc);
5553
}
5654
}
5755

58-
@Route(path = "/test/task/:taskId", methods = {Route.HttpMethod.GET}, produces = {APPLICATION_JSON}, type = Route.HandlerType.BLOCKING)
59-
public void getTask(@Param String taskId, RoutingContext rc) {
56+
@Route(path = "/test/task/:taskId", methods = { Route.HttpMethod.GET }, produces = {
57+
APPLICATION_JSON }, type = Route.HandlerType.BLOCKING)
58+
public void getTask(@Param String taskId, RoutingContext rc) {
6059
try {
6160
Task task = testUtilsBean.getTask(taskId);
6261
if (task == null) {
6362
rc.response()
64-
.setStatusCode(404)
65-
.end();
63+
.setStatusCode(404)
64+
.end();
6665
return;
6766
}
6867
rc.response()
@@ -75,7 +74,7 @@ public void getTask(@Param String taskId, RoutingContext rc) {
7574
}
7675
}
7776

78-
@Route(path = "/test/task/:taskId", methods = {Route.HttpMethod.DELETE}, type = Route.HandlerType.BLOCKING)
77+
@Route(path = "/test/task/:taskId", methods = { Route.HttpMethod.DELETE }, type = Route.HandlerType.BLOCKING)
7978
public void deleteTask(@Param String taskId, RoutingContext rc) {
8079
try {
8180
Task task = testUtilsBean.getTask(taskId);
@@ -94,7 +93,7 @@ public void deleteTask(@Param String taskId, RoutingContext rc) {
9493
}
9594
}
9695

97-
@Route(path = "/test/queue/ensure/:taskId", methods = {Route.HttpMethod.POST})
96+
@Route(path = "/test/queue/ensure/:taskId", methods = { Route.HttpMethod.POST })
9897
public void ensureTaskQueue(@Param String taskId, RoutingContext rc) {
9998
try {
10099
testUtilsBean.ensureQueue(taskId);
@@ -106,7 +105,7 @@ public void ensureTaskQueue(@Param String taskId, RoutingContext rc) {
106105
}
107106
}
108107

109-
@Route(path = "/test/queue/enqueueTaskStatusUpdateEvent/:taskId", methods = {Route.HttpMethod.POST})
108+
@Route(path = "/test/queue/enqueueTaskStatusUpdateEvent/:taskId", methods = { Route.HttpMethod.POST })
110109
public void enqueueTaskStatusUpdateEvent(@Param String taskId, @Body String body, RoutingContext rc) {
111110

112111
try {
@@ -120,7 +119,7 @@ public void enqueueTaskStatusUpdateEvent(@Param String taskId, @Body String body
120119
}
121120
}
122121

123-
@Route(path = "/test/queue/enqueueTaskArtifactUpdateEvent/:taskId", methods = {Route.HttpMethod.POST})
122+
@Route(path = "/test/queue/enqueueTaskArtifactUpdateEvent/:taskId", methods = { Route.HttpMethod.POST })
124123
public void enqueueTaskArtifactUpdateEvent(@Param String taskId, @Body String body, RoutingContext rc) {
125124

126125
try {
@@ -134,22 +133,23 @@ public void enqueueTaskArtifactUpdateEvent(@Param String taskId, @Body String bo
134133
}
135134
}
136135

137-
@Route(path = "/test/streamingSubscribedCount", methods = {Route.HttpMethod.GET}, produces = {TEXT_PLAIN})
136+
@Route(path = "/test/streamingSubscribedCount", methods = { Route.HttpMethod.GET }, produces = { TEXT_PLAIN })
138137
public void getStreamingSubscribedCount(RoutingContext rc) {
139138
rc.response()
140139
.setStatusCode(200)
141140
.end(String.valueOf(streamingSubscribedCount.get()));
142141
}
143142

144-
@Route(path = "/test/queue/childCount/:taskId", methods = {Route.HttpMethod.GET}, produces = {TEXT_PLAIN})
143+
@Route(path = "/test/queue/childCount/:taskId", methods = { Route.HttpMethod.GET }, produces = { TEXT_PLAIN })
145144
public void getChildQueueCount(@Param String taskId, RoutingContext rc) {
146145
int count = testUtilsBean.getChildQueueCount(taskId);
147146
rc.response()
148147
.setStatusCode(200)
149148
.end(String.valueOf(count));
150149
}
151150

152-
@Route(path = "/test/task/:taskId/config/:configId", methods = {Route.HttpMethod.DELETE}, type = Route.HandlerType.BLOCKING)
151+
@Route(path = "/test/task/:taskId/config/:configId", methods = {
152+
Route.HttpMethod.DELETE }, type = Route.HandlerType.BLOCKING)
153153
public void deleteTaskPushNotificationConfig(@Param String taskId, @Param String configId, RoutingContext rc) {
154154
try {
155155
Task task = testUtilsBean.getTask(taskId);
@@ -168,10 +168,11 @@ public void deleteTaskPushNotificationConfig(@Param String taskId, @Param String
168168
}
169169
}
170170

171-
@Route(path = "/test/task/:taskId", methods = {Route.HttpMethod.POST}, type = Route.HandlerType.BLOCKING)
171+
@Route(path = "/test/task/:taskId", methods = { Route.HttpMethod.POST }, type = Route.HandlerType.BLOCKING)
172172
public void saveTaskPushNotificationConfig(@Param String taskId, @Body String body, RoutingContext rc) {
173173
try {
174-
PushNotificationConfig notificationConfig = Utils.OBJECT_MAPPER.readValue(body, PushNotificationConfig.class);
174+
PushNotificationConfig notificationConfig = Utils.OBJECT_MAPPER.readValue(body,
175+
PushNotificationConfig.class);
175176
if (notificationConfig == null) {
176177
rc.response()
177178
.setStatusCode(404)

server-common/src/main/java/io/a2a/server/TransportMetadata.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.a2a.server;
22

3-
import io.a2a.spec.TransportProtocol;
43

54
/**
65
* Interface for transport endpoint implementations to provide metadata about their transport.

server-common/src/main/java/io/a2a/server/extensions/A2AExtensions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import java.util.List;
55
import java.util.Set;
66

7-
import io.a2a.common.A2AHeaders;
87
import io.a2a.spec.AgentCard;
98
import io.a2a.spec.AgentExtension;
109

server-common/src/main/java/io/a2a/server/tasks/InMemoryTaskStore.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package io.a2a.server.tasks;
22

3-
import java.util.ArrayList;
4-
import java.util.Collections;
53
import java.util.Comparator;
64
import java.util.List;
75
import java.util.concurrent.ConcurrentHashMap;
86
import java.util.concurrent.ConcurrentMap;
9-
import java.util.stream.Stream;
107

118
import jakarta.enterprise.context.ApplicationScoped;
129

server-common/src/main/java/io/a2a/server/tasks/ResultAggregator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import io.a2a.spec.A2AServerException;
1717
import io.a2a.spec.Event;
1818
import io.a2a.spec.EventKind;
19-
import io.a2a.spec.InternalError;
2019
import io.a2a.spec.JSONRPCError;
2120
import io.a2a.spec.Message;
2221
import io.a2a.spec.Task;

0 commit comments

Comments
 (0)