RFR (S) 8151223: String concatenation fails with implicit toString() on package-private class
forax at univ-mlv.fr
Tue Mar 8 16:55:45 UTC 2016
Thumb up for me,
just a minor nit: i think that sharpestAccessible should be package private and not protected.
----- Mail original -----
> De: "Aleksey Shipilev" <aleksey.shipilev at oracle.com>
> À: "Maurizio Cimadamore" <maurizio.cimadamore at oracle.com>, compiler-dev at openjdk.java.net
> Envoyé: Mardi 8 Mars 2016 14:59:22
> Objet: Re: RFR (S) 8151223: String concatenation fails with implicit toString() on package-private class
> On 03/08/2016 02:14 PM, Maurizio Cimadamore wrote:
> > 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.
> Thanks Maurizio, fixed both nits:
More information about the compiler-dev