-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID # 181807913: Add MD5 To Pagetab #558
Conversation
Add calculated MD5 to pagetab files
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.
LGTM please check comments. Also I have the following concern if user is passing md5 as an attribute, are we filtering out? it looks to me that we will end duplicating it.
} | ||
|
||
private fun ExtFile.toAttributes() = |
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.
attributes.map { it.toAttribute() } + Attribute(MD5.value, md5)
} | ||
|
||
private fun ExtFile.toAttributes() = |
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 think name toAttributes
and function is misleading (is an extension function of file) as we are not transforming a file into attributes, we are transforming file attributes into ext attributes. To make more clear imagine you have a class human
that have a born_country
attribute and one declarate an extension Human.getPopulation
which obtain the population of the country.
Even function implementation can be correct, is not correct to model a human with shuch operation.
About your question, yes, we already have logic that filters it out at deserialization but I added an integration test just to be sure |
- Improve method naming - Add MD5 attribute to testing - Fix Ktlint error
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.
LGTM
https://www.pivotaltracker.com/story/show/181807913
Add calculated MD5 to pagetab files