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

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue Mar 8 08:53:06 UTC 2016

On 03/08/2016 05:34 AM, John Rose wrote:
> The more cleverly we use static information when generating
> bytecodes, the more murky will be our binary compatibility story. I
> suggest you rely mainly on locally available metadata (caller class
> and its nest) and on stable packages (java.lang). Any uncertainty
> should send the argument type all the way to Object. Dynamic type
> profiling will pick up some of the dropped bits and we won't have
> binary compat. puzzles to solve down the road. Like the present bug.

Not really sure what you are suggesting to do right now, John.

I think sharpening to the most specific accessible class is okay,
because JLS Chapter 13 "Binary Compatibility" clearly points out that
changing the visibility of classes/members to less access may be binary
incompatible. IOW, once you compiled against an accessible class, it is
a maintainers' headache to preserve compatibility.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20160308/9b7d47a4/signature.asc>

More information about the compiler-dev mailing list