diff --git a/modules/swagger-core/src/test/java/io/swagger/v3/core/filter/SpecFilterTest.java b/modules/swagger-core/src/test/java/io/swagger/v3/core/filter/SpecFilterTest.java index f1c46524ea..6119e14ff6 100644 --- a/modules/swagger-core/src/test/java/io/swagger/v3/core/filter/SpecFilterTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/v3/core/filter/SpecFilterTest.java @@ -194,13 +194,14 @@ public void cloneEverythingConcurrent() throws IOException { for (int i = 0; i < numThreads; i++) { final int id = i; threads[i] = Thread.ofVirtual().name("SpecFilterTest").start(() -> { - try { + try { filteredMap.put("filtered " + id, new SpecFilter().filter(openAPI, new NoOpOperationsFilter(), null, null, null)); } catch (Exception e) { e.printStackTrace(); } }); } + Thread.ofVirtual().start(new FailureHandler(threads, filteredMap, openAPI)); } @@ -211,7 +212,7 @@ class FailureHandler implements Runnable { private FailureHandler(Thread[] threads, Map filteredMap, OpenAPI openAPI) { this.threads = threads; - this.filteredMap = filteredMap; + this.filteredMap = filteredMap; this.openAPI = openAPI; }