Repository: netty/netty
File: buffer/src/test/java/io/netty/buffer/AbstractByteBufTest.java (Java)

Code before:
        Callable<Void> callable = new Callable<Void>() {
            @Override
            public Void call() throws Exception {
                startBarrier.await();
                for (int i = 0; i < 6000; i++) {
                    ByteBuf buf;
                    if (slice) {
                        buf = buffer.slice();
                    } else {
                        buf = buffer.duplicate();
                    }

                    byte[] array = new byte[8];
                    buf.readBytes(array);

                    assertArrayEquals(expectedBytes, array);

                    Arrays.fill(array, (byte) 0);
                    buf.getBytes(0, array);
                    assertArrayEquals(expectedBytes, array);
                }
                endBarrier.await();
                return null;
            }
        };
        List<FutureTask<Void>> tasks = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            FutureTask<Void> task = new FutureTask<>(callable);
            new Thread(task).start();
            tasks.add(task);
        }
        try {
            endBarrier.await(30, TimeUnit.SECONDS);
        } catch (Exception e) {
            for (FutureTask<Void> task : tasks) {
                try {
                    task.get(100, TimeUnit.MILLISECONDS);
                } catch (Exception ex) {
                    e.addSuppressed(ex);
                }
            }
            throw e;
        }
        for (FutureTask<Void> task : tasks) {
            task.get(1, TimeUnit.SECONDS);
        }
    }

    public static Object[][] setCharSequenceCombinations() {
        List<Object[]> scenarios = new ArrayList<Object[]>();
        List<Charset> charsets = Arrays.asList(

Review comment (suggestion):
```suggestion
        List<FutureTask<Void>> tasks = new ArrayList<FutureTask<Void>>();
```

Code after:
        Callable<Void> callable = new Callable<Void>() {
            @Override
            public Void call() throws Exception {
                startBarrier.await();
                for (int i = 0; i < 6000; i++) {
                    ByteBuf buf;
                    if (slice) {
                        buf = buffer.slice();
                    } else {
                        buf = buffer.duplicate();
                    }

                    byte[] array = new byte[8];
                    buf.readBytes(array);

                    assertArrayEquals(expectedBytes, array);

                    Arrays.fill(array, (byte) 0);
                    buf.getBytes(0, array);
                    assertArrayEquals(expectedBytes, array);
                }
                endBarrier.await();
                return null;
            }
        };
        List<FutureTask<Void>> tasks = new ArrayList<FutureTask<Void>>();
        for (int i = 0; i < 10; i++) {
            FutureTask<Void> task = new FutureTask<Void>(callable);
            new Thread(task).start();
            tasks.add(task);
        }
        try {
            endBarrier.await(30, TimeUnit.SECONDS);
        } catch (Exception e) {
            for (FutureTask<Void> task : tasks) {
                try {
                    task.get(100, TimeUnit.MILLISECONDS);
                } catch (Exception ex) {
                    e.addSuppressed(ex);
                }
            }
            throw e;
        }
        for (FutureTask<Void> task : tasks) {
            task.get(1, TimeUnit.SECONDS);
        }
    }

    public static Object[][] setCharSequenceCombinations() {
        List<Object[]> scenarios = new ArrayList<Object[]>();
        List<Charset> charsets = Arrays.asList(