RFR raw types lint warnings fixes for java.util.concurrent

Joe Darcy joe.darcy at oracle.com
Wed Nov 13 18:16:41 UTC 2013


On 11/13/2013 1:42 AM, Chris Hegarty wrote:
> The changes look fine to me.
>
> Since Martin has already brought the changes into the JSR166 CVS, Joe 
> you can go ahead and push these changes to jdk8.

Will do; I'll shortly push the fix under JDK-8028300 Fix raw type lint 
warnings in java.util.concurrent.

Thanks,

-Joe

>
> Thanks,
> -Chris.
>
> On 11/12/2013 10:52 PM, Joe Darcy wrote:
>> Hello concurrency maestros,
>>
>> I submit for your consideration a simple patch to silence the three
>> remaining javac lint warnings in the java.util.concurrent package:
>>
>> diff -r 69432cb5bca2
>> src/share/classes/java/util/concurrent/ForkJoinPool.java
>> --- a/src/share/classes/java/util/concurrent/ForkJoinPool.java Tue Nov
>> 12 09:44:39 2013 -0800
>> +++ b/src/share/classes/java/util/concurrent/ForkJoinPool.java Tue Nov
>> 12 14:40:40 2013 -0800
>> @@ -1820,7 +1820,7 @@
>>                           }
>>                       }
>>                       for (;;) { // help stealer or descend to its 
>> stealer
>> -                        ForkJoinTask[] a; int b;
>> +                        ForkJoinTask<?>[] a; int b;
>>                           if (subtask.status < 0)     // surround probes
>> with
>>                               continue restart;       // consistency 
>> checks
>>                           if ((b = v.base) - v.top < 0 && (a = v.array)
>> != null) {
>> diff -r 69432cb5bca2
>> src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java
>> ---
>> a/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java 
>> Tue
>> Nov 12 09:44:39 2013 -0800
>> +++
>> b/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java 
>> Tue
>> Nov 12 14:40:40 2013 -0800
>> @@ -1253,11 +1253,11 @@
>>            * Snapshot iterator that works off copy of underlying q 
>> array.
>>            */
>>           private class Itr implements Iterator<Runnable> {
>> -            final RunnableScheduledFuture[] array;
>> +            final RunnableScheduledFuture<?>[] array;
>>               int cursor = 0;     // index of next element to return
>>               int lastRet = -1;   // index of last element, or -1 if no
>> such
>>
>> -            Itr(RunnableScheduledFuture[] array) {
>> +            Itr(RunnableScheduledFuture<?>[] array) {
>>                   this.array = array;
>>               }
>>
>> I am content to relinquish ownership in seeing this patch through the
>> 166 -> JDK 8 integration process :-)
>>
>> Thanks,
>>
>> -Joe




More information about the core-libs-dev mailing list