Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions sdk-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.json</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ static void setStreamingIsSubscribedRunnable(Runnable streamingIsSubscribedRunna
}

@Provider
public class JsonParseExceptionMapper implements ExceptionMapper<JsonParseException> {
public static class JsonParseExceptionMapper implements ExceptionMapper<JsonParseException> {

public JsonParseExceptionMapper() {
}

@Override
public Response toResponse(JsonParseException exception) {
Expand All @@ -219,6 +222,9 @@ public Response toResponse(JsonParseException exception) {
@Provider
public static class JsonMappingExceptionMapper implements ExceptionMapper<JsonMappingException> {

public JsonMappingExceptionMapper(){
}

@Override
public Response toResponse(JsonMappingException exception) {
if (exception.getCause() instanceof JsonParseException) {
Expand Down
6 changes: 6 additions & 0 deletions sdk-jakarta/src/main/resources/META-INF/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="annotated">
</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class JSONRPCHandler {
private AgentCard agentCard;
private RequestHandler requestHandler;

protected JSONRPCHandler() {
}

@Inject
public JSONRPCHandler(@PublicAgentCard AgentCard agentCard, RequestHandler requestHandler) {
this.agentCard = agentCard;
Expand Down
6 changes: 6 additions & 0 deletions sdk-server-common/src/main/resources/META-INF/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all">
</beans>
Loading