You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/13 07:13:31 UTC
[groovy] 02/03: Workaround javadoc bug
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 7f4edbaf2aede26e7cce82551a53f08ff857f5e6
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jun 13 14:43:14 2021 +0800
Workaround javadoc bug
---
.../collection/runtime/QueryableHelper.groovy | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableHelper.groovy b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableHelper.groovy
index 709549a..16940c6 100644
--- a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableHelper.groovy
+++ b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableHelper.groovy
@@ -23,7 +23,6 @@ import groovy.transform.CompileStatic
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
-import java.util.concurrent.ThreadFactory
import java.util.concurrent.TimeUnit
import java.util.function.Function
import java.util.function.Supplier
@@ -127,19 +126,13 @@ class QueryableHelper {
private QueryableHelper() {}
private static class ThreadPoolHolder {
- static final ExecutorService THREAD_POOL
- static {
- THREAD_POOL = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), new ThreadFactory() {
- private int seq
- @Override
- Thread newThread(Runnable r) {
- Thread t = new Thread(r)
- t.setName("ginq-thread-" + seq++)
- t.setDaemon(true)
- return t
- }
- })
- }
+ static int seq
+ static final ExecutorService THREAD_POOL = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors(), (Runnable r) -> {
+ Thread t = new Thread(r)
+ t.setName("ginq-thread-" + seq++)
+ t.setDaemon(true)
+ return t
+ })
private ThreadPoolHolder() {}
}
}