double-checked locking is not thread-safe in Java

found by PMD

Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
remove some dead Java code

Change-Id: I03dc362f7302ac8539a4da3dcef9466a7c6d7159
use correct loop index variable

Change-Id: I92531f8fc96c0cb0ca944a7dd50c4fe4ea740b37
no need to instantiate an object to get it's class

Change-Id: I7b1f8d4621a3db9094bb61753218db3646c33e34
java: Avoid naming non-fields with the prefix m_

found by PMD

Change-Id: I5955cfc9c4d777496a2e8e4b2c422a51764a8bc1
java: avoid unnecessary comparisons in boolean expressions

i.e. stuff like "x == true"

Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
java: avoid if..else when returning boolean values

Change-Id: Iab52762a9abfe8735223372b09638ce9d8d44318
java: remove unnecessary return statements

found by PMD

Change-Id: I3d150421948d17eaed34fac2b1a212da34288d1a