sjhajharia commented on code in PR #20393: URL: https://github.com/apache/kafka/pull/20393#discussion_r2311802573
########## 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: I kept it as a `PluginType` as `type` is that. If we change it to String, we will have to confirm all uses of the same. -- 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