-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Make all properties data classes #62
Conversation
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
We can use the one from the data class.
Good 👍🏻 |
src/main/kotlin/at/bitfire/dav4jvm/property/webdav/CurrentUserPrivilegeSet.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/at/bitfire/dav4jvm/property/caldav/CalendarHomeSet.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
Signed-off-by: Arnau Mora Gras <[email protected]>
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.
Nice :)
Changes
HrefListProperty$toString
: should be handled by the data class.GetETag$toString
: should be handled by the data class.ResourceType$toString
: should be handled by the data class.HrefListProperty.hrefs
to the constructor and made open so all the child classes can override it.FIXME
ScheduleTag
has a customtoString
method, do we want that implementation or use the data class one?val
instead ofvar
. I think it's the best approach, since the classes shouldn't be mutable, they represent an state given by the server, and it should be kept like that. We are only modifying the values for constructing the class, and I think it's not correct to keep them asvars
.HrefListProperty
classes useLinkedList
. Following the same principle as the point before, I think they should be immutable lists.