sjhajharia commented on code in PR #20393:
URL: https://github.com/apache/kafka/pull/20393#discussion_r2318467236


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/PluginInfo.java:
##########
@@ -45,59 +46,23 @@ public PluginInfo(PluginDesc<?> plugin) {
         this(plugin.className(), plugin.type(), plugin.version());
     }
 
-    @JsonProperty("class")
-    public String className() {
-        return className;
-    }
-
-    @JsonProperty("type")
-    public String type() {
-        return type.toString();
-    }
-
-    @JsonProperty("version")
-    @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = 
NoVersionFilter.class)
-    public String version() {
-        return version;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-        PluginInfo that = (PluginInfo) o;
-        return Objects.equals(className, that.className) &&
-               Objects.equals(type, that.type) &&
-               Objects.equals(version, that.version);
-    }
-
+    // Override accessor for `type` to serialize as string
     @Override
-    public int hashCode() {
-        return Objects.hash(className, type, version);
-    }
-
-    @Override
-    public String toString() {
-        return "PluginInfo{" + "className='" + className + '\'' +
-                ", type=" + type.toString() +
-                ", version='" + version + '\'' +
-                '}';
+    @JsonProperty("type")
+    public PluginType type() {

Review Comment:
   Ah sorry, I was reading the comment wrong. Yes indeed this code patch is 
unnecessary. I have updated the same.
   Pls re-review!



-- 
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