RFR (S) 8151223: String concatenation fails with implicit toString() on package-private class

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Mar 8 11:14:43 UTC 2016

On 08/03/16 11:12, Maurizio Cimadamore wrote:
> On 07/03/16 22:45, Aleksey Shipilev wrote:
>> I don't think it was redundant: Object.class passes isAccessible check,
>> and we exit the loop either with a concrete subclass of Object, or
>> Object itself. But I agree we may want to check for Tag.NONE too.
> Sorry - you are obviously right here - Object is always accessible, so 
> your code was indeed correct. Feel free to change it back if you like!
> Maurizio
Also one last nit:

Type componentType = ((Type.ArrayType) originalType).getComponentType();

getComponentType is an API method - there's an internal routine: 
Types.elemtype which works on any type, and thus you could avoid the cast.


More information about the compiler-dev mailing list