Why bytecode calls Object->getClass() at a direct field access
I decompiled Java (actually Dalvik) bytecode. In the beginning of a method, I access a field of an instance member directly (i.e. not through a getter). It seems tha Java calls Object.getClass() on the accessed instance member ( mOther ), but doesn't use the result anywhere. Is this some sort of check? Why is this call needed? I suspect it is because I access a field directly (which is defined in that class), but I don't see the connection. The Java code and the decompiled bytecode are as follows. (Note that the last instruction loads lifeTime as constant 0x0001 because in MyOtherClass , I