3-Digit country codes can get anonymized to three spaces
Closed this issue · 1 comments
SHMvanHouten commented
Anonimatron version:1.10.1
The behaviour of anonymizing 3 digit country codes is inconsistent:
Expected outcome or behaviour:
When you try to anonymize a country code you expect another three letter country code for the anonymized value.
Actual outcome or behavior:
Occasionally a country code will get anonymized to three spaces, this is because of the behaviour of Locale.getISO3Country())
which can return an empty String, this empty String then gets padded out to 3 spaces.
I am submitting a pull request next which I think should solve the issue.
realrolfje commented
There was one failing test but that was the Travis server which took too long hashing 2000 strings.