java: no need to call String.valueOf to append to a String

Change-Id: I5ef45b971d24dde814ab8cbb2e9503d9da4f0d73
java: final fields that can be static

Change-Id: I8c06be7bc0b8a38c662209f0de72a00550e25447
java: when rethrowing exceptions, store the original

Change-Id: I8a2a264597d0b1ae06b08136fea36003682380b5
java: dodgy &= operation

Change-Id: Ia909797e08948a8ad0e6f536ce2af57880dc13ef
java: should throw this exception

Change-Id: I0da1b5cda0ecf20d3566413864a45a49bbcb2a2d