diff --git a/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt b/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt index 5ceb4aa28e..a225a50490 100644 --- a/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt +++ b/utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/Api.kt @@ -339,7 +339,7 @@ object UtVoidModel : UtModel(voidClassId) * Model for enum constant */ data class UtEnumConstantModel( - override val id: Int?, + override val id: Int, override val classId: ClassId, val value: Enum<*> ) : UtReferenceModel(id, classId) { @@ -351,7 +351,7 @@ data class UtEnumConstantModel( * Model for class reference */ data class UtClassRefModel( - override val id: Int?, + override val id: Int, override val classId: ClassId, val value: Class<*> ) : UtReferenceModel(id, classId) { @@ -455,9 +455,7 @@ data class UtArrayModel( return true } - override fun hashCode(): Int { - return id - } + override fun hashCode(): Int = id } /** @@ -469,7 +467,7 @@ data class UtArrayModel( * @param modificationsChain is a chain of [UtStatementModel] to construct object state. */ data class UtAssembleModel private constructor( - override val id: Int?, + override val id: Int, override val classId: ClassId, override val modelName: String, val instantiationCall: UtExecutableCallModel, @@ -494,7 +492,7 @@ data class UtAssembleModel private constructor( * as [UtExecutableCallModel.instance]. */ constructor( - id: Int?, + id: Int, classId: ClassId, modelName: String, instantiationCall: UtExecutableCallModel, @@ -524,9 +522,7 @@ data class UtAssembleModel private constructor( return id == other.id } - override fun hashCode(): Int { - return id ?: 0 - } + override fun hashCode(): Int = id } /** @@ -554,7 +550,7 @@ data class UtAssembleModel private constructor( */ // TODO: what about support for Kotlin lambdas and function types? See https://github.com/UnitTestBot/UTBotJava/issues/852 class UtLambdaModel( - override val id: Int?, + override val id: Int, val samType: ClassId, val declaringClass: ClassId, val lambdaName: String, @@ -581,9 +577,7 @@ class UtLambdaModel( return true } - override fun hashCode(): Int { - return id ?: 0 - } + override fun hashCode(): Int = id } /** diff --git a/utbot-framework-api/src/main/kotlin/org/utbot/framework/process/OpenModulesContainer.kt b/utbot-framework-api/src/main/kotlin/org/utbot/framework/process/OpenModulesContainer.kt index fb53e2fd10..650e7d40c4 100644 --- a/utbot-framework-api/src/main/kotlin/org/utbot/framework/process/OpenModulesContainer.kt +++ b/utbot-framework-api/src/main/kotlin/org/utbot/framework/process/OpenModulesContainer.kt @@ -15,6 +15,33 @@ object OpenModulesContainer { openPackage("java.base", "java.lang") openPackage("java.base", "java.lang.reflect") openPackage("java.base", "sun.security.provider") + openPackage("java.base", "jdk.internal.event") + openPackage("java.base", "jdk.internal.jimage") + openPackage("java.base", "jdk.internal.jimage.decompressor") + openPackage("java.base", "jdk.internal.jmod") + openPackage("java.base", "jdk.internal.jtrfs") + openPackage("java.base", "jdk.internal.loader") + openPackage("java.base", "jdk.internal.logger") + openPackage("java.base", "jdk.internal.math") + openPackage("java.base", "jdk.internal.misc") + openPackage("java.base", "jdk.internal.module") + openPackage("java.base", "jdk.internal.org.objectweb.asm.commons") + openPackage("java.base", "jdk.internal.org.objectweb.asm.signature") + openPackage("java.base", "jdk.internal.org.objectweb.asm.tree") + openPackage("java.base", "jdk.internal.org.objectweb.asm.tree.analysis") + openPackage("java.base", "jdk.internal.org.objectweb.asm.util") + openPackage("java.base", "jdk.internal.org.xml.sax") + openPackage("java.base", "jdk.internal.org.xml.sax.helpers") + openPackage("java.base", "jdk.internal.perf") + openPackage("java.base", "jdk.internal.platform") + openPackage("java.base", "jdk.internal.ref") + openPackage("java.base", "jdk.internal.reflect") + openPackage("java.base", "jdk.internal.util") + openPackage("java.base", "jdk.internal.util.jar") + openPackage("java.base", "jdk.internal.util.xml") + openPackage("java.base", "jdk.internal.util.xml.impl") + openPackage("java.base", "jdk.internal.vm") + openPackage("java.base", "jdk.internal.vm.annotation") add("--illegal-access=warn") } }