Company
Date Published
May 31, 2018
Author
Srushtika Neelakantam
Word count
817
Language
English
Hacker News points
None

Summary

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.