C0urante commented on code in PR #15149:
URL: https://github.com/apache/kafka/pull/15149#discussion_r1445387176
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectResource.java:
##########
@@ -16,12 +16,15 @@
*/
package org.apache.kafka.connect.runtime.rest.resources;
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.container.ContainerRequestFilter;
+import java.io.IOException;
import java.util.concurrent.TimeUnit;
/**
* This interface defines shared logic for all Connect REST resources.
*/
-public interface ConnectResource {
+public interface ConnectResource extends ContainerRequestFilter {
Review Comment:
They're both hacks, and both require implementing classes to be annotated
with `@Singleton` to avoid unnecessary warnings, but this seems slightly
cleaner (especially since it doesn't automatically implement the request filter
interface that we may want to use for real later on).
I did some local experimenting and it seems like the `@ConstrainedTo`
annotation isn't actually necessary--let me know if I'm missing something,
though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]