Replace boolean array with AtomicBoolean.
diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
index 14d646a..23bf03b 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/DefaultFileContentTest.java
@@ -22,6 +22,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.charset.StandardCharsets;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -185,17 +186,18 @@
 
         try (FileObject file = fileSystemManager.resolveFile(temp.getAbsolutePath())) {
             T stream = getStream.apply(file.getContent());
-            boolean[] check = { false };
+            AtomicBoolean check = new AtomicBoolean();
             Thread thread = new Thread(() -> {
                 try {
                     stream.close();
                 } catch (IOException exception) {
+                    // ignore
                 }
-                check[0] = true;
+                check.set(true);
             });
             thread.start();
             thread.join();
-            Assert.assertTrue(check[0]);
+            Assert.assertTrue(check.get());
         }
     }
 }