Skip to content

Commit 35d73ee

Browse files
committed
chore: Additional assertion and apply formatter
1 parent b29953c commit 35d73ee

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/server/transport/WebFluxSseServerTransportProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ public WebFluxSseServerTransportProvider(ObjectMapper objectMapper, String conte
159159
Assert.notNull(contextPath, "Context path must not be null");
160160
Assert.notNull(baseUrl, "Message base path must not be null");
161161
Assert.notNull(messageEndpoint, "Message endpoint must not be null");
162+
Assert.hasText(messageEndpoint, "Message endpoint must not be empty");
162163
Assert.notNull(sseEndpoint, "SSE endpoint must not be null");
164+
Assert.hasText(sseEndpoint, "SSE endpoint must not be empty");
163165

164166
this.objectMapper = objectMapper;
165167
this.contextPath = Utils.removeTrailingSlash(contextPath);

mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/server/WebFluxSseCustomPathIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public void testCustomizedEndpoints(String baseUrl, String messageEndpoint, Stri
9797
}
9898

9999
/**
100-
* This is a helper function for the tests which builds the SSE endpoint to pass to the client transport.
101-
*
100+
* This is a helper function for the tests which builds the SSE endpoint to pass to
101+
* the client transport.
102102
* @param contextPath context path of the server.
103103
* @param baseUrl base url of the sse endpoint.
104104
* @param sseEndpoint the sse endpoint.

mcp-spring/mcp-spring-webmvc/src/test/java/io/modelcontextprotocol/server/WebMvcSseCustomPathIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ public void testCustomizedEndpoints(String baseUrl, String messageEndpoint, Stri
122122
}
123123

124124
/**
125-
* This is a helper function for the tests which builds the SSE endpoint to pass to the client transport.
126-
*
125+
* This is a helper function for the tests which builds the SSE endpoint to pass to
126+
* the client transport.
127127
* @param contextPath context path of the server.
128128
* @param baseUrl base url of the sse endpoint.
129129
* @param sseEndpoint the sse endpoint.

mcp/src/main/java/io/modelcontextprotocol/util/Utils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public static boolean isEmpty(@Nullable Map<?, ?> map) {
5353
return (map == null || map.isEmpty());
5454
}
5555

56-
5756
/**
5857
* Removes the trailing slash character of the given String.
5958
* @param str the String to remove the trailing slash

0 commit comments

Comments
 (0)