-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MINOR: Cleanup Connect Module (5/n) #20393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Adding @chia7712 as he has been helping with tonnes of reviews in this area. |
A label of 'needs-attention' was automatically added to this PR in order to raise the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sjhajharia thanks for this patch!
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/ConfigInfos.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/ConfigKeyInfo.java
Outdated
Show resolved
Hide resolved
...ct/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/ConfigValueInfo.java
Outdated
Show resolved
Hide resolved
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/entities/PluginInfo.java
Outdated
Show resolved
Hide resolved
", version='" + version + '\'' + | ||
'}'; | ||
@JsonProperty("type") | ||
public PluginType type() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it change the type from PluginType
to String
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excuse me, the overrided version is totally same to the generated code, so is it necessary to override it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I was reading the comment wrong. Yes indeed this code patch is unnecessary. I have updated the same.
Pls re-review!
public boolean equals(Object obj) { | ||
return PluginDesc.UNDEFINED_VERSION.equals(obj); | ||
} | ||
|
||
// Dummy hashCode method to not fail compilation because of equals() method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please keep this comment? Otherwise, the implementation return super.hashCode();
look odd to me, since it's essentially identical to the default implementation
This PR aims at cleaning up the
connect:runtime
module further by getting rid of some extra code which can be replaced by record and the relevant changes.