Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Add nooargs constructors so we work in Jakarta
  • Loading branch information
kabir committed Jan 8, 2026
commit 4ca08a8321ded70440dfd0d8361489995ffdae5e
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ public class ReplicatedQueueManager implements QueueManager {

private TaskStateProvider taskStateProvider;

/**
* No-args constructor for CDI proxy creation.
*/
Comment thread
kabir marked this conversation as resolved.
@SuppressWarnings("NullAway")
protected ReplicatedQueueManager() {
// For CDI proxy creation
this.delegate = null;
this.replicationStrategy = null;
this.taskStateProvider = null;
}
Comment thread
kabir marked this conversation as resolved.

@Inject
public ReplicatedQueueManager(ReplicationStrategy replicationStrategy, TaskStateProvider taskStateProvider) {
this.replicationStrategy = replicationStrategy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ public class InMemoryQueueManager implements QueueManager {
private final EventQueueFactory factory;
private final TaskStateProvider taskStateProvider;

/**
* No-args constructor for CDI proxy creation.
*/
Comment thread
kabir marked this conversation as resolved.
@SuppressWarnings("NullAway")
protected InMemoryQueueManager() {
// For CDI proxy creation
this.factory = null;
this.taskStateProvider = null;
}
Comment thread
kabir marked this conversation as resolved.

@Inject
public InMemoryQueueManager(TaskStateProvider taskStateProvider) {
this.factory = new DefaultEventQueueFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,23 @@ public class DefaultRequestHandler implements RequestHandler {

private final Executor executor;

/**
* No-args constructor for CDI proxy creation.
* CDI requires a non-private constructor to create proxies for @ApplicationScoped beans.
* All fields are initialized by the @Inject constructor during actual bean creation.
*/
@SuppressWarnings("NullAway")
protected DefaultRequestHandler() {
// For CDI proxy creation
this.agentExecutor = null;
this.taskStore = null;
this.queueManager = null;
this.pushConfigStore = null;
this.pushSender = null;
this.requestContextBuilder = null;
this.executor = null;
}
Comment thread
kabir marked this conversation as resolved.

@Inject
public DefaultRequestHandler(AgentExecutor agentExecutor, TaskStore taskStore,
QueueManager queueManager, PushNotificationConfigStore pushConfigStore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ public class BasePushNotificationSender implements PushNotificationSender {
private final A2AHttpClient httpClient;
private final PushNotificationConfigStore configStore;

/**
* No-args constructor for CDI proxy creation.
*/
Comment thread
kabir marked this conversation as resolved.
@SuppressWarnings("NullAway")
protected BasePushNotificationSender() {
// For CDI proxy creation
this.httpClient = null;
this.configStore = null;
}
Comment thread
kabir marked this conversation as resolved.

@Inject
public BasePushNotificationSender(PushNotificationConfigStore configStore) {
this.httpClient = new JdkA2AHttpClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ public class JSONRPCHandler {
private RequestHandler requestHandler;
private final Executor executor;

@SuppressWarnings("NullAway")
protected JSONRPCHandler() {
Comment thread
kabir marked this conversation as resolved.
// For CDI proxy creation
this.agentCard = null;
this.extendedAgentCard = null;
this.requestHandler = null;
this.executor = null;
}
Comment thread
kabir marked this conversation as resolved.

@Inject
public JSONRPCHandler(@PublicAgentCard AgentCard agentCard, @Nullable @ExtendedAgentCard Instance<AgentCard> extendedAgentCard,
RequestHandler requestHandler, @Internal Executor executor) {
Expand Down