prefer new instance, following "make" signature terminology;
authorwenzelm
Fri, 21 Oct 2022 17:56:56 +0200
changeset 76352 f2b98eb6a7a9
parent 76351 2cee31cd92f0
child 76353 3698d0f3da18
prefer new instance, following "make" signature terminology;
src/Pure/General/compress.scala
--- a/src/Pure/General/compress.scala	Fri Oct 21 16:39:31 2022 +0200
+++ b/src/Pure/General/compress.scala	Fri Oct 21 17:56:56 2022 +0200
@@ -35,7 +35,11 @@
 
   object Cache {
     def none: Cache = { Zstd.init(); new Cache(ArrayCache.getDummyCache(), NoPool.INSTANCE) }
-    def make(): Cache = { Zstd.init(); new Cache(new BasicArrayCache, RecyclingBufferPool.INSTANCE) } // FIXME new pool
+    def make(): Cache = {
+      Zstd.init()
+      val pool = Untyped.constructor(classOf[RecyclingBufferPool]).newInstance()
+      new Cache(new BasicArrayCache, pool)
+    }
   }