/plushcap/analysis/ably/android-vm-bug-interned-strings-incorrect

This Android VM bug causes interned strings to be handled incorrectly

What's this blog post about?

Ably, a realtime messaging platform, recently discovered a bug in Android VM that caused some data not to be delivered as expected on certain devices. The issue was found while building a subscriber client using the Java client library SDK with Android. It appeared that messages were missing metadata such as event name on specific versions of Samsung Galaxy tablets. The problem was traced back to a string comparison operation in the code, which used the == operator instead of the equals(Object) method for testing equality. Upon further investigation, it was confirmed that the Java VM on this particular device had a bug in handling interned strings. Ably has updated its library and no longer relies on the affected behavior of the Java VM. Developers who encounter similar issues should consider employing workarounds accordingly.

Company
Ably

Date published
May 31, 2018

Author(s)
Srushtika Neelakantam

Word count
817

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.