diff --git a/mcp-core/pom.xml b/mcp-core/pom.xml
index 64deecb..41301bd 100644
--- a/mcp-core/pom.xml
+++ b/mcp-core/pom.xml
@@ -22,8 +22,8 @@
- 21
- 21
+ 17
+ 17
@@ -60,16 +60,6 @@
test
-
-
-
@@ -80,14 +70,6 @@
pom
import
-
-
@@ -97,14 +79,7 @@
org.apache.maven.plugins
maven-compiler-plugin
3.12.1
-
-
diff --git a/mcp-core/src/main/java/spring/ai/experimental/mcp/spec/DefaultMcpSession.java b/mcp-core/src/main/java/spring/ai/experimental/mcp/spec/DefaultMcpSession.java
index d736d9b..9ecac63 100644
--- a/mcp-core/src/main/java/spring/ai/experimental/mcp/spec/DefaultMcpSession.java
+++ b/mcp-core/src/main/java/spring/ai/experimental/mcp/spec/DefaultMcpSession.java
@@ -38,21 +38,18 @@ public class DefaultMcpSession implements McpSession {
this.transport = transport;
this.transport.setInboudMessageHandler(message -> {
- switch (message) {
- case McpSchema.JSONRPCResponse response -> {
- var sink = pendingResponses.remove(response.id());
- if (sink == null) {
- System.out.println("Unexpected response for unkown id " + response.id());
- } else {
- sink.success(response);
- }
- }
- case McpSchema.JSONRPCRequest request -> {
- System.out.println("Client does not yet support server requests");
- }
- case McpSchema.JSONRPCNotification notification -> {
- System.out.println("Notifications not yet supported");
+
+ if ( message instanceof McpSchema.JSONRPCResponse response) {
+ var sink = pendingResponses.remove(response.id());
+ if (sink == null) {
+ System.out.println("Unexpected response for unkown id " + response.id());
+ } else {
+ sink.success(response);
}
+ } else if ( message instanceof McpSchema.JSONRPCRequest request) {
+ System.out.println("Client does not yet support server requests");
+ } else if ( message instanceof McpSchema.JSONRPCNotification notification) {
+ System.out.println("Notifications not yet supported");
}
});
diff --git a/mcp-spring-boot/pom.xml b/mcp-spring-boot/pom.xml
index a5470ac..0dd0c61 100644
--- a/mcp-spring-boot/pom.xml
+++ b/mcp-spring-boot/pom.xml
@@ -28,7 +28,7 @@
- 21
+ 17
1.0.0-M4
diff --git a/mcp-spring/pom.xml b/mcp-spring/pom.xml
index 9e65a6f..d70cc51 100644
--- a/mcp-spring/pom.xml
+++ b/mcp-spring/pom.xml
@@ -22,7 +22,7 @@
- 21
+ 17
1.0.0-M4
diff --git a/pom.xml b/pom.xml
index ed28f34..2afa920 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
- 21
+ 17
1.0.0-M4