diff --git a/utbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/providers/ObjectModelProvider.kt b/utbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/providers/ObjectModelProvider.kt index 628e680988..1bfb616316 100644 --- a/utbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/providers/ObjectModelProvider.kt +++ b/utbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/providers/ObjectModelProvider.kt @@ -22,6 +22,7 @@ import java.lang.reflect.Field import java.lang.reflect.Member import java.lang.reflect.Method import java.lang.reflect.Modifier.* +import org.utbot.framework.plugin.api.util.isEnum /** * Creates [UtAssembleModel] for objects which have public constructors @@ -42,7 +43,7 @@ class ObjectModelProvider( description: FuzzedMethodDescription, classId: ClassId ): List { - if (classId == stringClassId || classId.isPrimitiveWrapper) + if (classId == stringClassId || classId.isPrimitiveWrapper || classId.isEnum || classId.isAbstract) return listOf() val constructors = collectConstructors(classId) { javaConstructor -> diff --git a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt index 8e874b692d..50b11a2d06 100644 --- a/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt +++ b/utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt @@ -1,5 +1,16 @@ package org.utbot.contest +import java.io.File +import java.lang.reflect.Method +import java.lang.reflect.Modifier +import java.net.URL +import java.net.URLClassLoader +import java.nio.file.Paths +import kotlin.concurrent.thread +import kotlin.math.max +import kotlin.math.min +import kotlin.reflect.KCallable +import kotlin.reflect.jvm.isAccessible import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.GlobalScope @@ -39,8 +50,6 @@ import org.utbot.framework.plugin.api.UtMethodTestSet import org.utbot.framework.plugin.api.util.UtContext import org.utbot.framework.plugin.api.util.executableId import org.utbot.framework.plugin.api.util.id -import org.utbot.framework.plugin.api.util.isConstructor -import org.utbot.framework.plugin.api.util.isEnum import org.utbot.framework.plugin.api.util.jClass import org.utbot.framework.plugin.api.util.utContext import org.utbot.framework.plugin.api.util.withUtContext @@ -50,18 +59,6 @@ import org.utbot.instrumentation.ConcreteExecutor import org.utbot.instrumentation.ConcreteExecutorPool import org.utbot.instrumentation.Settings import org.utbot.instrumentation.warmup.Warmup -import java.io.File -import java.lang.reflect.Method -import java.lang.reflect.Modifier -import java.net.URL -import java.net.URLClassLoader -import java.nio.file.Paths -import java.util.concurrent.ConcurrentSkipListSet -import kotlin.concurrent.thread -import kotlin.math.max -import kotlin.math.min -import kotlin.reflect.KCallable -import kotlin.reflect.jvm.isAccessible internal const val junitVersion = 4 private val logger = KotlinLogging.logger {} @@ -396,14 +393,13 @@ private fun prepareClass(javaClazz: Class<*>, methodNameFilter: String?): List