Yes, you are right, autoboxing does exactly Integer.valueOf() in this case. I know it for a while now, but I still have to abandon my habit to avoid it :)