I think I found a problem that causes this behavior; it was placed in OpenJDK as error 8042786 and, indeed, is related to autoboxing. Running Java with -XX:-EliminateAutoBoxseems to be a valid workaround and fixes this problem.
. , , -, SO.
VM , , , , :
110674 C1, , C2 main , C2 :
b.byteValue() & 0xff , x 0 255. , x == -1 .java.lang.System - , System.out.println , , .b.byteValue() & 0xff, , , , and, , x, ( movsbl). , x 32 , , x 0-255.
, , x == -1 , C2 , x != 255 , , , x 255 ( , Byte.valueOf() b.byteValue() , , -, , ). , System.out, , . x "" -1 .
C1- , C2 java.lang.System. :
- ,
x == -1 . java.lang.System , x + " is not 255 (" + i + ")" . Integer.toString(), , ( , x ), , , x , 1 ( 10). , '0' + -1; , /.
, .:)