RFR raw types lint warnings fixes for java.util.concurrent
Martin Buchholz
martinrb at google.com
Tue Nov 12 23:06:44 UTC 2013
Thanks, Joe.
I see these warnings are due to very recent changes to javac.
jsr166 CVS is now updated with these fixes.
On Tue, Nov 12, 2013 at 2:52 PM, Joe Darcy <joe.darcy at oracle.com> 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