Update copyright headers to 2025 and clean up code

- Add copyright headers to files missing them
- Add blank lines after copyright headers for consistency
- Remove unused imports in test files
- Remove unnecessary keep-alive warning logs in WebFlux and WebMvc transport providers

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
Christian Tzolov 2025-08-01 16:06:02 +01:00
commit a49b9f5914
75 changed files with 188 additions and 33 deletions

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.client.transport;
import java.io.IOException;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol.client.transport;
import java.io.IOException;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.server.transport;
import java.io.IOException;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.server.transport;
import com.fasterxml.jackson.databind.ObjectMapper;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.server.transport;
import com.fasterxml.jackson.core.type.TypeReference;
@ -89,10 +93,6 @@ public class WebFluxStreamableServerTransportProvider implements McpStreamableSe
this.keepAliveScheduler.start();
}
else {
logger.warn("Keep-alive interval is not set or invalid. No keep-alive will be scheduled.");
}
}
@Override

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol;
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol;
import com.fasterxml.jackson.databind.ObjectMapper;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol;
import com.fasterxml.jackson.databind.ObjectMapper;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.client;
import io.modelcontextprotocol.client.transport.WebClientStreamableHttpTransport;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.client;
import org.junit.jupiter.api.Timeout;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2025-2025 the original author or authors.
*/
package io.modelcontextprotocol.client;
import org.junit.jupiter.api.Timeout;

View file

@ -5,9 +5,7 @@
package io.modelcontextprotocol.server;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.modelcontextprotocol.server.transport.WebFluxSseServerTransportProvider;
import io.modelcontextprotocol.server.transport.WebFluxStreamableServerTransportProvider;
import io.modelcontextprotocol.spec.McpServerTransportProvider;
import io.modelcontextprotocol.spec.McpStreamableServerTransportProvider;
import org.junit.jupiter.api.Timeout;
import org.springframework.http.server.reactive.HttpHandler;

View file

@ -5,7 +5,6 @@
package io.modelcontextprotocol.server;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.modelcontextprotocol.server.transport.WebFluxSseServerTransportProvider;
import io.modelcontextprotocol.server.transport.WebFluxStreamableServerTransportProvider;
import io.modelcontextprotocol.spec.McpStreamableServerTransportProvider;
import org.junit.jupiter.api.Timeout;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol.server.transport;
import java.io.IOException;

View file

@ -1,3 +1,7 @@
/*
* Copyright 2024-2024 the original author or authors.
*/
package io.modelcontextprotocol.server.transport;
import com.fasterxml.jackson.databind.ObjectMapper;

View file

@ -95,9 +95,6 @@ public class WebMvcStreamableServerTransportProvider implements McpStreamableSer
private McpTransportContextExtractor<ServerRequest> contextExtractor;
// private Function<ServerRequest, McpTransportContext> contextExtractor = req -> new
// DefaultMcpTransportContext();
/**
* Flag indicating if the transport is shutting down.
*/
@ -142,9 +139,6 @@ public class WebMvcStreamableServerTransportProvider implements McpStreamableSer
this.keepAliveScheduler.start();
}
else {
logger.warn("Keep-alive interval is not set or invalid. No keep-alive will be scheduled.");
}
}
@Override

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol;
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024 - 2024 the original author or authors.
*/
package io.modelcontextprotocol;
import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2024-2024 the original author or authors.
*/
package io.modelcontextprotocol.client;
import eu.rekawek.toxiproxy.Proxy;

View file

@ -1,6 +1,7 @@
/*
* Copyright 2025 - 2025 the original author or authors.
*/
package io.modelcontextprotocol.server;
import java.io.IOException;

Some files were not shown because too many files have changed in this diff Show more