Skip to content
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

BE: Chore: use record classes #703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

yeikel
Copy link
Contributor

@yeikel yeikel commented Dec 12, 2024

What changes did you make? (Give an overview)

Refactors the code to take advantage of records

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • Unit checks

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

A picture of a cute animal (not mandatory but encouraged)

istockphoto-479513144-612x612

@yeikel yeikel requested a review from a team as a code owner December 12, 2024 00:58
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Dec 12, 2024
@yeikel yeikel changed the title BE: Chore : use record classes BE: Chore: use record classes Dec 12, 2024
@yeikel yeikel force-pushed the refactor-record branch 4 times, most recently from c083660 to fc1e8cc Compare December 12, 2024 01:37
@Haarolean Haarolean added scope/backend Related to backend changes type/chore Boring stuff, could be refactoring or tech debt and removed status/triage/manual Manual triage in progress labels Dec 12, 2024
@yeikel yeikel force-pushed the refactor-record branch 3 times, most recently from d4e3423 to c1870b6 Compare December 18, 2024 03:15
@yeikel
Copy link
Contributor Author

yeikel commented Dec 23, 2024

@Haarolean What is blocking the merge of this change?

Thanks in advance!

public SchemaDescription(String schema, Map<String, Object> additionalProperties) {
this.schema = schema;
this.additionalProperties = additionalProperties;
public SchemaDescription {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a default constructor here?..

*/
public final class DeserializeResult {
public record DeserializeResult(String result, io.kafbat.ui.serde.api.DeserializeResult.Type type,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io.kafbat.ui.serde.api.DeserializeResult.Type - can we import this?
String result - @nullable won't hurt I guess considering the comment we had on line 16

@@ -67,11 +68,6 @@ public boolean equals(Object o) {
&& additionalProperties.equals(that.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(result, type, additionalProperties);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@Haarolean Haarolean added this to the 1.2 milestone Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/backend Related to backend changes status/triage/completed Automatic triage completed type/chore Boring stuff, could be refactoring or tech debt
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants