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(
255
255
fun createJcContainer (
256
256
tmpDir : File ,
257
257
classpathFiles : List <File >
258
- ) = JcContainer (
258
+ ) = JcContainer .getOrCreate (
259
259
usePersistence = false ,
260
260
persistenceDir = tmpDir,
261
261
classpath = classpathFiles,
Original file line number Diff line number Diff line change @@ -18,7 +18,13 @@ import kotlin.time.Duration.Companion.seconds
18
18
private val logger = KotlinLogging .logger {}
19
19
20
20
// 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 (
22
28
usePersistence : Boolean ,
23
29
persistenceDir : File ,
24
30
classpath : List <File >,
@@ -91,7 +97,7 @@ class JcContainer private constructor(
91
97
92
98
private val cache = HashMap <List <File >, JcContainer > ()
93
99
94
- operator fun invoke (
100
+ fun getOrCreate (
95
101
usePersistence : Boolean ,
96
102
persistenceDir : File ,
97
103
classpath : List <File >,
You can’t perform that action at this time.
0 commit comments