Is there some easy way to use "when" with ByteArra...
# getting-started
k
Is there some easy way to use "when" with ByteArray ? I have bunch of 2-3 byte arrays, and need to have switch. if(a.contentEquals(b)) is a valid alternative, but I was looking for something with "when(a)". (for 1.4-*)
s
Copy code
when {
  a.contentEquals(b) -> println("b")
  a.contentEquals(c) -> println("c")
  else -> ...
}
when-with-subject can only use
==
I’m pretty sure
a
Be careful if you are representing versions as bytes (
1.4.*
looks like it). We were just hit this issue: https://github.com/jasypt/jasypt/issues/33
k
thx!