Fix issue with obfuscated actions/states being the same regardless of data.
Issue was due to the hash coding occurring on the class name instead of
the actual object.
Obfuscation only really applies to data classes since kotlin gives us a toString
that contains the class' data (printing a normal class will output something
similar to our obfuscated strings).
Sample (where comment indicates print result)
Without obfuscating:
data class ObfuscatedAction(val data: String) : BaseAction
print(ObfuscatedAction(data="test")) // ObfuscatedAction(data=test)
With obfuscating:
data class ObfuscatedAction(val data: String) : BaseAction {
override fun toString() = obfuscatedString()
}
print(ObfuscatedAction(data="test")) // ObfuscatedAction@123 - where 123 is the hash code.
More Stuff
Bump to 0.2.1 with fixes.
Add kluent to make our tests prettier.
Fix issue with obfuscated actions/states being the same regardless of data.
Issue was due to the hash coding occurring on the class name instead of the actual object.
Obfuscation only really applies to
data class
es since kotlin gives us atoString
that contains the class' data (printing a normalclass
will output something similar to our obfuscated strings).Sample (where comment indicates print result)
Without obfuscating:
With obfuscating:
More Stuff
Bump to
0.2.1
with fixes. Add kluent to make our tests prettier.