RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

Remi Forax forax at univ-mlv.fr
Wed Aug 7 19:08:42 UTC 2013


On 08/07/2013 08:59 PM, Joe Darcy wrote:
> Amended version approved to go back.
>
> Thanks,
>
> -Joe

As one of the guys involved in the design of this API :)
I'm Ok with this change.

Rémi

>
> On 08/07/2013 11:54 AM, Dan Xu wrote:
>> I see, Thanks! I have updated my changeto 
>> http://cr.openjdk.java.net/~dxu/8022554/webrev1/.
>>
>> -Dan
>>
>> On 08/07/2013 11:46 AM, Joe Darcy wrote:
>>> Hi Dan,
>>>
>>> Even if the compiler does not complain, using "Class" or "Class[]" 
>>> is using a raw type and raw types should generally be viewed as 
>>> unacceptable in modern code.
>>>
>>> Cheers,
>>>
>>> -Joe
>>>
>>> On 08/07/2013 11:36 AM, Dan Xu wrote:
>>>> Thanks for your review!
>>>>
>>>> I was thinking of that. But without Class<?>[] on the left, the 
>>>> compiler just worked fine.
>>>>
>>>> Here is a simple example,
>>>>
>>>> //Main.java
>>>>
>>>> import java.util.*;
>>>>
>>>> public class Main {
>>>>     public static final Class[] TEST_CLASS = new Class<?>[16];
>>>>     public static final List[] TEST_MAP = new ArrayList<?>[16];
>>>> }
>>>>
>>>> After compiling with javac Xlint:all Main.java, no warnings are 
>>>> printed out. Is it a compiler issue? Thanks!
>>>>
>>>> -Dan
>>>>
>>>>
>>>>
>>>> On 08/07/2013 11:11 AM, Joe Darcy wrote:
>>>>> I agree with Mike; Class<?>[] should be used on both sides.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> -Joe
>>>>>
>>>>> On 08/07/2013 10:53 AM, Mike Duigou wrote:
>>>>>> Why not have Class<?>[] on the left side as well?
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>> On Aug 7 2013, at 10:49 , Dan Xu wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> Please review the simple warning fix in 
>>>>>>> src/share/classes/sun/invoke/anon/ConstantPoolPatch.java.
>>>>>>>
>>>>>>> webrev: http://cr.openjdk.java.net/~dxu/8022554/webrev/
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> -Dan
>>>>>
>>>>
>>>
>>
>




More information about the core-libs-dev mailing list