File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package org.utbot.engine
3
3
import org.utbot.common.findField
4
4
import org.utbot.common.findFieldOrNull
5
5
import org.utbot.common.invokeCatching
6
+ import org.utbot.common.withAccessibility
6
7
import org.utbot.framework.plugin.api.ClassId
7
8
import org.utbot.framework.plugin.api.ConstructorId
8
9
import org.utbot.framework.plugin.api.EnvironmentModels
@@ -390,12 +391,19 @@ class ValueConstructor {
390
391
*/
391
392
private fun value (model : UtModel ) = construct(model, null ).value
392
393
393
-
394
394
private fun MethodId.call (args : List <Any ?>, instance : Any? ): Any? =
395
- method.invokeCatching(obj = instance, args = args).getOrThrow()
395
+ method.run {
396
+ withAccessibility {
397
+ invokeCatching(obj = instance, args = args).getOrThrow()
398
+ }
399
+ }
396
400
397
401
private fun ConstructorId.call (args : List <Any ?>): Any? =
398
- constructor .newInstance(* args.toTypedArray())
402
+ constructor .run {
403
+ withAccessibility {
404
+ newInstance(* args.toTypedArray())
405
+ }
406
+ }
399
407
400
408
/* *
401
409
* Fetches primitive value from NutsModel to create array of primitives.
You can’t perform that action at this time.
0 commit comments