File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
src/main/java/oracle/r2dbc/impl Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -108,20 +108,13 @@ final class OracleConnectionFactoryImpl implements ConnectionFactory {
108
108
* configured. It will use the common {@code ForkJoinPool}, unless it has
109
109
* a maximum pool size of 0. See:
110
110
* https://github.com/oracle/oracle-r2dbc/issues/129
111
- * </p><p>
112
- * As of JDK 11, it appears that ForkJoinPool does not expose a
113
- * maximum pool size. {@link ForkJoinPool#getCommonPoolParallelism()} and
114
- * {@link ForkJoinPool#getParallelism()} will return 1 when the maximum pool
115
- * size is 0. For this reason, the conditional below will check for a
116
- * parallelism that is greater than 1, rather than 0. It is noted that
117
- * {@code CompletableFuture} uses the same logic when initializing its
118
- * USE_COMMON_POOL field.
119
111
* </p>
120
112
*/
121
113
private static final Executor DEFAULT_EXECUTOR =
122
- ForkJoinPool .getCommonPoolParallelism () > 1
123
- ? ForkJoinPool .commonPool ()
124
- : new ForkJoinPool (1 );
114
+ "0" .equals (System .getProperty (
115
+ "java.util.concurrent.ForkJoinPool.common.parallelism" ))
116
+ ? new ForkJoinPool (1 )
117
+ : ForkJoinPool .commonPool ();
125
118
126
119
/** JDBC data source that this factory uses to open connections */
127
120
private final DataSource dataSource ;
You can’t perform that action at this time.
0 commit comments