File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
utbot-junit-contest/src/main/kotlin/org/utbot/contest/usvm
utbot-usvm/src/main/kotlin/org/utbot/usvm/jc Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ fun runUsvmGeneration(
255255fun createJcContainer (
256256 tmpDir : File ,
257257 classpathFiles : List <File >
258- ) = JcContainer (
258+ ) = JcContainer .getOrCreate (
259259 usePersistence = false ,
260260 persistenceDir = tmpDir,
261261 classpath = classpathFiles,
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ import kotlin.time.Duration.Companion.seconds
1818private val logger = KotlinLogging .logger {}
1919
2020// TODO usvm-sbft-refactoring: copied from `usvm/usvm-jvm/test`, extract this class back to USVM project
21- class JcContainer private constructor(
21+ /* *
22+ * NOTE that JcContainer can also be instantiated with [JcContainer.getOrCreate] method.
23+ *
24+ * Calling constructor directly should be used if you definitely want to create
25+ * new JcContainer instead of trying it get it from containers cache.
26+ */
27+ class JcContainer (
2228 usePersistence : Boolean ,
2329 persistenceDir : File ,
2430 classpath : List <File >,
@@ -91,7 +97,7 @@ class JcContainer private constructor(
9197
9298 private val cache = HashMap <List <File >, JcContainer > ()
9399
94- operator fun invoke (
100+ fun getOrCreate (
95101 usePersistence : Boolean ,
96102 persistenceDir : File ,
97103 classpath : List <File >,
You can’t perform that action at this time.
0 commit comments