Fixed a bug in Utils.anonymize

This commit is contained in:
Fabian Schlenz 2018-04-10 06:13:29 +02:00
parent 5c466131d3
commit be1cf8ba91
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ object Utils {
}
fun String.anonymize(): String {
return if (Utils.anonymize) this else this.replace(Regex("[0-9]"), "1").replace(Regex("[A-Z]"), "A").replace(Regex("[a-z]"), "a") + " (ANONYMIZED)"
return if (!Utils.anonymize) this else this.replace(Regex("[0-9]"), "1").replace(Regex("[A-Z]"), "A").replace(Regex("[a-z]"), "a") + " (ANONYMIZED)"
}
fun Any.toJson(): String = Gson().toJson(this)