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

Cleanup checksum classes #869

Merged
merged 5 commits into from Mar 21, 2019

Conversation

feoktant
Copy link
Contributor

@feoktant feoktant commented Mar 9, 2019

Cleanup for CheckSum and its test classes.

Character could be removed via String::replace method, rather then
String::replaceAll method based on regexp. This should lead to better
performance and less memory consumption.
Precompiled matcher should improve overall performance. Also, it
improves code readability by regexp groups. To improve code, delimiter
':' was also extracted to constant. That leaded to changed CheckSum::toString
method.

Regexp pattern was changed to be more strict and acept checksum only as
alphanumeric signs, as it is described in documentation. Pattern leaved
case insensitive.
This test tests nothing, since hashcode, as int primitive could be never
null in JVM.
Previous version do not admit old Mac systems with linendings like
single CR. After fix dead code in comment was uncommented and works.
@nvoxland nvoxland merged commit e5e14e5 into liquibase:master Mar 21, 2019
@nvoxland
Copy link
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants