-
-
Notifications
You must be signed in to change notification settings - Fork 20
Create specific HREF definition for HrefListProperty
#105
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: main
Are you sure you want to change the base?
Create specific HREF definition for HrefListProperty
#105
Conversation
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.
Pull Request Overview
This pull request refactors the HREF constant definition by moving it from DavResource.Companion to HrefListProperty.Companion, improving code organization and reducing coupling between classes.
Key changes:
- Added
HREFconstant toHrefListProperty.Companion - Updated references within
HrefListPropertyto use the localHREFconstant - Removed dependency on
DavResourceimport inHrefListProperty
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fun create(parser: XmlPullParser, list: HrefListProperty): HrefListProperty { | ||
| val hrefs = list.hrefs.toMutableList() | ||
| XmlReader(parser).readTextPropertyList(DavResource.Companion.HREF, hrefs) | ||
| XmlReader(parser).readTextPropertyList(HREF, hrefs) |
Copilot
AI
Oct 29, 2025
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.
The HREF constant is now referenced without qualification, but it's defined in a companion object at the end of the same abstract class. Other usages in the codebase (e.g., Response.kt at line 134 and Owner.kt at line 36) still reference DavResource.Companion.HREF. These should be updated to use HrefListProperty.HREF instead for consistency, or this change creates fragmentation where the same constant exists in two places with different usages across the codebase.
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.
Well, it's a good point. But I don't know if I want to update all usages. At least right now.
| ) -> PropertyType): PropertyType { | ||
| val hrefs = mutableListOf<String>() | ||
| XmlReader(parser).readTextPropertyList(DavResource.Companion.HREF, hrefs) | ||
| XmlReader(parser).readTextPropertyList(HREF, hrefs) |
Copilot
AI
Oct 29, 2025
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.
The HREF constant is now referenced without qualification, but it's defined in a companion object at the end of the same abstract class. Other usages in the codebase (e.g., Response.kt at line 134 and Owner.kt at line 36) still reference DavResource.Companion.HREF. These should be updated to use HrefListProperty.HREF instead for consistency, or this change creates fragmentation where the same constant exists in two places with different usages across the codebase.
| XmlReader(parser).readTextPropertyList(HREF, hrefs) | |
| XmlReader(parser).readTextPropertyList(HrefListProperty.HREF, hrefs) |
No description provided.