On Dec 6, 2011, at 3:42 PM, Stuart Marks wrote:

> On 12/1/11 3:12 PM, John Rose wrote:
>> 7117167: Misc warnings in java.lang.invoke and sun.invoke.*
>> 
>> http://cr.openjdk.java.net/~jrose/7117167/webrev.00/
>> 
>> Removing build warnings from java.lang.invoke and sun.invoke.*, as part of 
>> the December 2011 cleanup effort.
> 
> Hi John,
> 
> I'm finally getting back to this. Just a couple comments:
> 
> MethodHandles.java --
> 
> The change here is to add a wildcard type parameter to the parameter of the 
> unreflectConstructor() method. I believe this is a public API. Is such a 
> change permitted? I started thinking about compatibility, but compatibility 
> is actually a side issue. The main issue is whether it's a spec change. I 
> think it is, but I have to admit that not really sure. But if it is a spec 
> change, I don't think we should be making it in the context of warnings 
> cleanup.

Foo; you are right.  That will require an small Act of Congress to fix.  I'll 
add it to my API cleanup list.

> MethodHandleImpl.java --
> 
> Just an observation, really, but I puzzled for a while over the suppression 
> of rawtypes and unchecked warnings at the construction of AllocateObject 
> (L115). As I looked further I realized, "oh *that's* what Remi was talking 
> about." [1] On the other hand I see your point that the class declaration 
> AllocateObject<C> and uses of C within that class really do make sense. 
> Perhaps this is the time when one really wants to write
> 
>    new AllocateObject<?>(...)
> 
> but of course this is illegal. I don't have a specific recommendation to 
> change anything here. It's just that whenever there's code that's puzzling, 
> I'm always looking around for a better way to write it.

I am currently working on minimizing MethodHandleImpl.java, and AllocateObject 
may go away, so I would rather just leave it as is for the moment.

> Anyway, that's it, everything else looks fine.

Thanks!

-- John

> s'marks
> 
> [1] http://mail.openjdk.java.net/pipermail/jdk8-dev/2011-December/000406.html

Reply via email to