The code is as follows; this is an asynchronous method annotated with the @Async annotation.
// interface
@Async("ioTaskExecutor")
CompletableFuture<List<BufferedImage>> getPdfImages(String pdfPath);
//impl
…...Error when extracting images from PDF in multithreading: Not...ArrayList<>(); try (Document document = new Document(pdfFilePath))...