hg: jdk7/tl/langtools: 6979683: inconsistent interaction of reference cast with box/unbox conversions leaves out a useful case

Ulf Zibis Ulf.Zibis at gmx.de
Thu Sep 2 11:21:50 PDT 2010


  Hi,

is Bug ID: 6775385 NPE caused by ConditionalExpression and auto-boxing failure 
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6775385>
concerned by this bug ?

-Ulf


Am 02.09.2010 03:54, schrieb John Rose:
> On Sep 1, 2010, at 6:31 PM, Neal Gafter wrote:
>
>> I also can't find any general rule about casting being allowed to do the reverse of multi-step conversions, which seems to be your "bottom line" justification.
> By your reading, what is the spec. support for (Object)(int)x? (I.e., (Object)n, where 'n' is 'int'?)
>
> I think the spec. support for (Object)(int) is the use of combined steps from the first para. of 5.5.
>
> If that is the case, there is no reason to deny (int)(Object) its place in the twilight.
>
> (Yes, I agree the spec. is gray here.  There is an umbrella proposal to bring clarity to it, mentioned in the final paragraph of my bug report.)
>
> Do you have an alternative reading of the spec. that allows (Object)(int) but not (int)(Object)?
>
> Best,
> -- John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20100902/fb6021b9/attachment.html 


More information about the compiler-dev mailing list