File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
main/groovy/nextflow/util Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,6 @@ class KryoHelper {
112112 kryo. addDefaultSerializer(GString , GStringSerializer )
113113 // map entry serializer
114114 kryo. addDefaultSerializer(Map.Entry , MapEntrySerializer )
115- // register PathSerializer as default for all Path implementations not explicitly registered
116- // (e.g. JimfsPath used in tests) to prevent Kryo's FieldSerializer from recursing into
117- // internal fields that may contain non-serializable objects such as lambdas (Guava 33.4+)
118- kryo. addDefaultSerializer(Path , PathSerializer )
119115
120116 return kryo
121117 }
Original file line number Diff line number Diff line change 1515 */
1616
1717package test
18+
19+ import com.google.common.jimfs.JimfsPath
20+ import nextflow.util.KryoHelper
21+ import nextflow.util.PathSerializer
22+
1823import java.nio.file.Files
1924import java.nio.file.Path
2025import java.util.zip.GZIPInputStream
@@ -53,6 +58,13 @@ class TestHelper {
5358
5459 static private fs = Jimfs . newFileSystem(Configuration . unix());
5560
61+ static {
62+ // Some tests failed after a Guava update (Guava 33.4+) when using Jimfs.
63+ // Adding a default serializer for JimfsPaths to prevent Kryo's FieldSerializer from recursing into internal
64+ // fields that may contain non-serializable objects such as lambdas
65+ KryoHelper . kryo(). addDefaultSerializer(JimfsPath . class, PathSerializer )
66+ }
67+
5668 static Path createInMemTempDir () {
5769 Path tmp = fs. getPath(" /tmp" );
5870 tmp. mkdir()
You can’t perform that action at this time.
0 commit comments