frankvicky commented on code in PR #19452:
URL: https://github.com/apache/kafka/pull/19452#discussion_r2041156088


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/RestartRequest.java:
##########
@@ -25,14 +25,12 @@
  * A request to restart a connector and/or task instances.
  * <p>
  * The natural order is based first upon the connector name and then requested 
restart behaviors.
- * If two requests have the same connector name, then the requests are ordered 
based on the 
+ * If two requests have the same connector name, then the requests are ordered 
based on the
  * probable number of tasks/connector this request is going to restart.
  */
-public class RestartRequest implements Comparable<RestartRequest> {
-
-    private final String connectorName;
-    private final boolean onlyFailed;
-    private final boolean includeTasks;
+public record RestartRequest(String connectorName,

Review Comment:
   I suggest moving the original `@param` documentation to the class level, 
which would allow the removal of the getters and their associated Javadoc. The 
null check can be done using a compact constructor. WDYT?
   
   For example:
   ```java
       public RestartRequest {
           Objects.requireNonNull(connectorName, "Connector name may not be 
null");
       }
   ```
   
   
   



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to