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

Get rid of Apache Commons #41

Merged
merged 19 commits into from
Jul 15, 2024
Merged

Conversation

ArnyminerZ
Copy link
Member

No description provided.

@ArnyminerZ ArnyminerZ added the refactoring Quality improvement of existing functions label Jul 5, 2024
@ArnyminerZ ArnyminerZ self-assigned this Jul 5, 2024
@ArnyminerZ ArnyminerZ linked an issue Jul 5, 2024 that may be closed by this pull request
Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
@ArnyminerZ ArnyminerZ requested a review from rfc2822 July 5, 2024 08:52
Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
@ArnyminerZ ArnyminerZ requested review from sunkup and removed request for rfc2822 July 5, 2024 09:13
@ArnyminerZ
Copy link
Member Author

@rfc2822 I've turned Contact into a data class for the toString method, but now that it's a data class, do we want to keep using vars, or maybe it's better to use the copy method? I don't know how many replacements that would be. In that sense, if we make all variables inmutable, we should also make the lists non-mutable as well, so I don't know if we would want that now.

Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
Signed-off-by: Arnau Mora <[email protected]>
@ArnyminerZ ArnyminerZ requested a review from rfc2822 July 8, 2024 07:02
@rfc2822
Copy link
Member

rfc2822 commented Jul 8, 2024

Making ical4android and vcard4android data classes immutable is a good idea and on the plan for "somewhen" ;) But I think it's enough for now if they become data classes with var without further changes. However using data classes allows us to get rid of the reflection toString calls.

@sunkup sunkup removed their request for review July 9, 2024 09:08
Signed-off-by: Arnau Mora <[email protected]>
…possible' into 40-get-rid-of-apache-commons-if-possible
@ArnyminerZ ArnyminerZ requested a review from rfc2822 July 15, 2024 14:42
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

Looks good :)

I have added _contact to the toString()s.

Also, Contact had a equals() without matching hashCode(), which is not allowed in Java, so I added the hash code.

@rfc2822 rfc2822 merged commit d5415f2 into main Jul 15, 2024
4 checks passed
@rfc2822 rfc2822 deleted the 40-get-rid-of-apache-commons-if-possible branch July 15, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Quality improvement of existing functions
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Get rid of Apache Commons, if possible
2 participants