Since 1.4.0 the `contentEquals` method on classes ...
# announcements
a
Since 1.4.0 the
contentEquals
method on classes like
ByteArray, IntArray
have been marked as deprecated. I am used to the Java world where a deprecation usually goes hand in hand with information on what can be used as an alternative. Does anyone know what can be used to compare the contents of arrays instead of contentEquals? It looks like this functionality eventually calls through to java.util.Arrays.equals which takes nullable values. So maybe this is to indicate that
ByteArray?.contentEquals
is supposed to be called and eventually the other version will just be dropped. Why not just drop it anyway in 1.4.0 already since it should just 'work'?
n
because thats how a deprecation cycle works.. also better safe than sorry in case that "just" dropping it causes edgecases they did not think about to break
i
Since 1.4,
ByteArray?.contentEquals
is applicable in all cases instead of
ByteArray.contentEquals
. But if the setting
-api-version 1.3
is used, the newer function becomes invisible, so we keep the older one, but hide it from version 1.4, so it is available only with api-version 1.3 and lower.
a
Thanks Ilya