From 6cdf7370011a339811d316b07d157c95ab43ae01 Mon Sep 17 00:00:00 2001 From: Andre Wachsmuth Date: Wed, 24 Jan 2024 09:03:52 +0100 Subject: [PATCH] run spotless --- .../javascript/tests/NativeRegExpTest.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/testsrc/org/mozilla/javascript/tests/NativeRegExpTest.java b/testsrc/org/mozilla/javascript/tests/NativeRegExpTest.java index e1abcce32d..0d5fabb45e 100644 --- a/testsrc/org/mozilla/javascript/tests/NativeRegExpTest.java +++ b/testsrc/org/mozilla/javascript/tests/NativeRegExpTest.java @@ -8,17 +8,15 @@ import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; -import org.junit.Test; -import org.mozilla.javascript.Context; -import org.mozilla.javascript.Scriptable; -import org.mozilla.javascript.ScriptableObject; - -import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import org.junit.Test; +import org.mozilla.javascript.Context; +import org.mozilla.javascript.Scriptable; +import org.mozilla.javascript.ScriptableObject; public class NativeRegExpTest { @@ -63,12 +61,16 @@ public void ignoreCase() throws Exception { public void interruptLongRunningRegExpEvaluation() throws Exception { ExecutorService executorService = Executors.newSingleThreadExecutor(); try { - Future future = executorService.submit(() -> test("false", "/(.*){1,32000}[bc]/.test(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");")); + Future future = + executorService.submit( + () -> + test( + "false", + "/(.*){1,32000}[bc]/.test(\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\");")); assertThrows(TimeoutException.class, () -> future.get(1, TimeUnit.SECONDS)); executorService.shutdownNow(); assertTrue(executorService.awaitTermination(30, TimeUnit.SECONDS)); - } - finally { + } finally { executorService.shutdown(); } }