Skip to content

Commit 2d09b02

Browse files
committed
Revert "Avoid class initialization when we evaluate ClassId"
This reverts commit 62f25ad.
1 parent 62f25ad commit 2d09b02

12 files changed

Lines changed: 5 additions & 9 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jakartaVersion=3.1.0
104104
jacoDbVersion=1.4.1
105105
# TODO left outdated here to avoid exceeding GitHub packages drive space,
106106
# TODO run `gradle publishToMavenLocal -Pversion={usvmVersion}` locally in usvm project and update {usvmVersion} locally
107-
usvmVersion=2811-2
107+
usvmVersion=comp-231124-ev
108108

109109
# use latest Java 8 compaitable Spring and Spring Boot versions
110110
springVersion=5.3.28

utbot-junit-contest/src/main/kotlin/org/utbot/contest/ContestEstimator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ fun main(args: Array<String>) {
425425
// very special case when you run your project directly from IntellijIDEA omitting command line arguments
426426
if (args.isEmpty()) {
427427
processedClassesThreshold = 9999 //change to change number of classes to run
428-
val timeLimit = 30 // increase if you want to debug something
428+
val timeLimit = 20 // increase if you want to debug something
429429
val fuzzingRatio = 0.1 // sets fuzzing ratio to total test generation
430430

431431
// Uncomment it for debug purposes:
@@ -446,7 +446,7 @@ fun main(args: Array<String>) {
446446

447447
// config for SBST 2022
448448
methodFilter = null
449-
projectFilter = listOf("seata-core-0.5.0")
449+
projectFilter = listOf("fastjson-1.2.50", "guava-26.0", "seata-core-0.5.0", "spoon-core-7.0.0")
450450
// TODO usvm-sbft-merge: add if here if we want merge contest it into main
451451
tools = listOf(Tool.USVM)
452452

utbot-junit-contest/src/main/kotlin/org/utbot/contest/usvm/converter/ConverterUtils.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ val JcType?.classId: ClassId
6868
get() {
6969
if (this !is JcPrimitiveType) {
7070
return runCatching {
71-
this
72-
?.replaceToBoundIfGeneric()
73-
?.toJavaClass(utContext.classLoader, initialize = false)
74-
?.id
75-
?: error("Can not construct classId for $this")
71+
this?.replaceToBoundIfGeneric()?.toJavaClass(utContext.classLoader)?.id ?: error("Can not construct classId for $this")
7672
}.getOrElse { e ->
7773
throw IllegalStateException("JcType.classId failed on ${this?.typeName}", e)
7874
}
@@ -94,7 +90,7 @@ val JcType?.classId: ClassId
9490
}
9591

9692
val JcClassOrInterface.classId: ClassId
97-
get() = this.toJavaClass(utContext.classLoader, initialize = false).id
93+
get() = this.toJavaClass(utContext.classLoader).id
9894

9995
fun TypeName.findClassId(classpath: JcClasspath): ClassId =
10096
classpath.findTypeOrNull(this.typeName)?.classId
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)