Commit aa9ad7f
authored
fix: ignore UnsupportedOperationException for virtual threads (#2866)
The virtual threads util that tries to create a virtual thread factory on JVMs that support this would fail on Java 20, because:
1. Java 20 supports virtual threads as an experimental feature. This means that the code is present.
2. The feature is by default disabled, and throws an UnsupportedOperationException.
This fix takes the above into account and returns null if a user tries to create a virtual threads factory on Java 20 with experimental features disabled.1 parent 79c30d2 commit aa9ad7f
File tree
1 file changed
+10
-0
lines changed- google-cloud-spanner/src/main/java/com/google/cloud/spanner
1 file changed
+10
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | 79 | | |
| |||
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
0 commit comments